mgoin commited on
Commit
2e6fcd5
·
1 Parent(s): c536375

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -113,13 +113,13 @@ with gr.Blocks() as demo:
113
  "temperature": temperature,
114
  }
115
  inference = pipe(sequences=message, streaming=False, **generation_config)
116
- # history[-1][1] += message
117
- # for token in inference:
118
- # history[-1][1] += token.generations[0].text
119
- # yield history
120
- history[-1][1] += inference.generations[0].text
121
  print(pipe.timer_manager)
122
- return history
123
 
124
  textbox.submit(
125
  fn=clear_and_save_textbox,
 
113
  "temperature": temperature,
114
  }
115
  inference = pipe(sequences=message, streaming=False, **generation_config)
116
+ history[-1][1] += message
117
+ for token in inference:
118
+ history[-1][1] += token.generations[0].text
119
+ yield history
120
+ # history[-1][1] += inference.generations[0].text
121
  print(pipe.timer_manager)
122
+ # return history
123
 
124
  textbox.submit(
125
  fn=clear_and_save_textbox,