Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,14 @@ def generate_text(input_text, history):
|
|
19 |
response = output['choices'][0]['text']
|
20 |
history.append([input_text, response])
|
21 |
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
demo = gr.ChatInterface(generate_text)
|
25 |
demo.launch()
|
26 |
|
|
|
19 |
response = output['choices'][0]['text']
|
20 |
history.append([input_text, response])
|
21 |
|
22 |
+
return "", history
|
23 |
+
|
24 |
+
with gr.Blocks() as demo:
|
25 |
+
chatbot = gr.Chatbot()
|
26 |
+
msg = gr.Textbox()
|
27 |
+
clear = gr.ClearButton([msg, chatbot])
|
28 |
+
|
29 |
+
msg.submit(generate_text, [msg, chatbot], [msg, chatbot])
|
30 |
|
|
|
31 |
demo.launch()
|
32 |
|