jcleee commited on
Commit
a25debe
·
verified ·
1 Parent(s): ba48c4c

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +0 -23
Gradio_UI.py CHANGED
@@ -190,29 +190,6 @@ def stream_to_gradio(
190
 
191
 
192
 
193
-
194
- final_output = handle_agent_output_types(final_output)
195
-
196
- if isinstance(final_output, AgentText):
197
- yield gr.ChatMessage(
198
- role="assistant",
199
- content=final_output.to_string().strip(),
200
- )
201
- elif isinstance(final_output, AgentImage):
202
- yield gr.ChatMessage(
203
- role="assistant",
204
- content={"path": final_output.to_string(), "mime_type": "image/png"},
205
- )
206
- elif isinstance(final_output, AgentAudio):
207
- yield gr.ChatMessage(
208
- role="assistant",
209
- content={"path": final_output.to_string(), "mime_type": "audio/wav"},
210
- )
211
- else:
212
- yield gr.ChatMessage(role="assistant", content=str(final_output).strip())
213
-
214
-
215
-
216
 
217
  class GradioUI:
218
  """A one-line interface to launch your agent in Gradio"""
 
190
 
191
 
192
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
 
194
  class GradioUI:
195
  """A one-line interface to launch your agent in Gradio"""