Manasa1 commited on
Commit
bb166c7
·
verified ·
1 Parent(s): e760e28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -28,7 +28,12 @@ agent = Agent(
28
  )
29
 
30
  def generate_article(topic):
31
- return agent.print_response(topic, stream=True)
 
 
 
 
 
32
 
33
  iface = gr.Interface(
34
  fn=generate_article,
 
28
  )
29
 
30
  def generate_article(topic):
31
+ response = agent.print_response(topic, stream=True)
32
+ # Collect the streamed responses
33
+ full_response = ""
34
+ for part in response:
35
+ full_response += part
36
+ return full_response
37
 
38
  iface = gr.Interface(
39
  fn=generate_article,