as-cle-bert commited on
Commit
bc18af2
Β·
verified Β·
1 Parent(s): 3cc3c6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -32,7 +32,11 @@ def reply(message, history):
32
  512, # float (numeric value between 128 and 4096) in 'Max new tokens' Slider component
33
  api_name="/chat"
34
  )
35
- return response
 
 
 
 
36
 
37
  demo = gr.ChatInterface(fn=reply, title="Climate-related Financial Disclosures Counselor", theme=mytheme)
38
  demo.launch(server_name="0.0.0.0", share=False)
 
32
  512, # float (numeric value between 128 and 4096) in 'Max new tokens' Slider component
33
  api_name="/chat"
34
  )
35
+ this_hist = ''
36
+ for char in response:
37
+ this_hist += char
38
+ time.sleep(0.0001)
39
+ yield this_hist
40
 
41
  demo = gr.ChatInterface(fn=reply, title="Climate-related Financial Disclosures Counselor", theme=mytheme)
42
  demo.launch(server_name="0.0.0.0", share=False)