Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -113,13 +113,17 @@ with gr.Blocks() as demo:
|
|
113 |
history = gr.State(init_history)
|
114 |
|
115 |
submitBtn.click(
|
116 |
-
predict,
|
|
|
117 |
[five_sample, history], show_progress=True
|
118 |
)
|
119 |
submitBtn.click(reset_user_input, [], [user_input])
|
120 |
submitBtn.click(reset_user_input, [], [final_sample])
|
121 |
|
122 |
-
expand.select(
|
|
|
|
|
|
|
123 |
|
124 |
emptyBtn.click(reset_state,
|
125 |
outputs=[five_sample, final_sample, history],
|
|
|
113 |
history = gr.State(init_history)
|
114 |
|
115 |
submitBtn.click(
|
116 |
+
predict,
|
117 |
+
[user_input, max_length, top_p, temperature, history],
|
118 |
[five_sample, history], show_progress=True
|
119 |
)
|
120 |
submitBtn.click(reset_user_input, [], [user_input])
|
121 |
submitBtn.click(reset_user_input, [], [final_sample])
|
122 |
|
123 |
+
expand.select(
|
124 |
+
fn=predict,
|
125 |
+
inputs=[expand, max_length, top_p, temperature, history],
|
126 |
+
outputs=final_sample)
|
127 |
|
128 |
emptyBtn.click(reset_state,
|
129 |
outputs=[five_sample, final_sample, history],
|