Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
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,
|