jcleee commited on
Commit
75f1191
·
verified ·
1 Parent(s): 45769ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -125,14 +125,9 @@ import gradio as gr
125
  def run_agent(question):
126
  try:
127
  result = agent(question)
128
- return [str(result)] # API needs list-wrapped string
129
  except Exception as e:
130
  return [f"Error: {e}"]
131
 
132
- # Main launch
133
- with gr.Blocks() as demo:
134
- gr.Markdown("### Chat with your agent")
135
- chatbot_ui = GradioUI(agent)
136
- gr.Interface(fn=run_agent, inputs="text", outputs="text") # Hidden interface
137
-
138
- demo.launch()
 
125
  def run_agent(question):
126
  try:
127
  result = agent(question)
128
+ return [str(result)] # Must return a list with one string (like ["answer"])
129
  except Exception as e:
130
  return [f"Error: {e}"]
131
 
132
+ demo = gr.Interface(fn=run_agent, inputs="text", outputs="text")
133
+ demo.launch()