Spaces:
Sleeping
Sleeping
Commit
·
36c25e1
1
Parent(s):
64811f0
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,7 @@ def chatgpt_clone(input, history):
|
|
| 73 |
output = openai_create(inp)
|
| 74 |
history.append((input, output))
|
| 75 |
time.sleep(2)
|
| 76 |
-
return
|
| 77 |
|
| 78 |
|
| 79 |
|
|
@@ -93,9 +93,10 @@ with block:
|
|
| 93 |
["Tenho febre, podes ajudar?."],
|
| 94 |
],
|
| 95 |
state = gr.State()
|
| 96 |
-
|
| 97 |
message.submit(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
|
| 98 |
-
submit
|
|
|
|
| 99 |
|
| 100 |
# msg.submit(respond, [msg, chatbot], [msg, chatbot])
|
| 101 |
block.launch(inline=False)
|
|
|
|
| 73 |
output = openai_create(inp)
|
| 74 |
history.append((input, output))
|
| 75 |
time.sleep(2)
|
| 76 |
+
return history, history
|
| 77 |
|
| 78 |
|
| 79 |
|
|
|
|
| 93 |
["Tenho febre, podes ajudar?."],
|
| 94 |
],
|
| 95 |
state = gr.State()
|
| 96 |
+
clear = gr.ClearButton([msg, chatbot])
|
| 97 |
message.submit(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
|
| 98 |
+
#submit = gr.Button("Enviar")
|
| 99 |
+
#submit.click(chatgpt_clone, inputs=[message, state], outputs=[chatbot, state])
|
| 100 |
|
| 101 |
# msg.submit(respond, [msg, chatbot], [msg, chatbot])
|
| 102 |
block.launch(inline=False)
|