gufett0 commited on
Commit
20039a1
·
1 Parent(s): 898fe03

added text streamer

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. backend.py +2 -1
app.py CHANGED
@@ -12,4 +12,4 @@ iface = gr.ChatInterface(
12
 
13
  if __name__ == "__main__":
14
  progress=gr.Progress(track_tqdm=True)
15
- iface.launch()
 
12
 
13
  if __name__ == "__main__":
14
  progress=gr.Progress(track_tqdm=True)
15
+ iface.launch(debug=True)
backend.py CHANGED
@@ -83,10 +83,11 @@ def handle_query(query_str, chathistory):
83
  # Execute the query
84
  streaming_response = query_engine.query(query_str)
85
 
 
86
 
87
  # Stream the response
88
  outputs = []
89
- for text in streaming_response.response_gen:
90
 
91
  outputs.append(str(text))
92
  yield "".join(outputs)
 
83
  # Execute the query
84
  streaming_response = query_engine.query(query_str)
85
 
86
+ #streaming_response.
87
 
88
  # Stream the response
89
  outputs = []
90
+ for text in streaming_response.async_response_gen:
91
 
92
  outputs.append(str(text))
93
  yield "".join(outputs)