Skip to content

Commit 89a0abb

Browse files
committed
fix(ui): render Assistant ChatInterface by wrapping in Blocks
1 parent 3a0df75 commit 89a0abb

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

app.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,17 @@ def create_pdf_wrapper(data_json, out_path=None, include_chart=True):
145145

146146

147147
# ---------- Assistant tab ----------
148-
assistant_chat = gr.ChatInterface(
149-
fn=answer,
150-
title="NeurArk Data Assistant",
151-
examples=[
152-
"Show me total sales for 2024 and create a PDF report"
153-
],
154-
api_name=False, # Hide from API and MCP
155-
# Specify message type explicitly to avoid warning
156-
chatbot=gr.Chatbot(type="messages"),
157-
type="messages"
158-
)
148+
with gr.Blocks() as assistant_chat:
149+
gr.ChatInterface(
150+
fn=answer,
151+
title="NeurArk Data Assistant",
152+
examples=[
153+
"Show me total sales for 2024 and create a PDF report"
154+
],
155+
api_name=False, # hide from external MCP schema
156+
chatbot=gr.Chatbot(type="messages"),
157+
type="messages",
158+
)
159159

160160

161161
# ---------- Tabs UI -----------------

0 commit comments

Comments
 (0)