Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,8 @@ def respond(message, chat_history, history):
|
|
32 |
|
33 |
def WA(history):
|
34 |
sendWA("573138614084",history)
|
|
|
|
|
35 |
|
36 |
css = """.gradio-container-3-47-1 button {font-size: 75%;}
|
37 |
.message.svelte-1pjfiar.svelte-1pjfiar.svelte-1pjfiar {padding: 5px;}
|
@@ -60,7 +62,7 @@ with gr.Blocks(theme=gr.themes.Default(text_size="sm"),css=css) as demo:
|
|
60 |
#history_button = gr.Button("Show history")
|
61 |
btn.click(respond, inputs=[msg, chatbot,history], outputs=[msg, chatbot,history])
|
62 |
msg.submit(respond, inputs=[msg, chatbot,history], outputs=[msg, chatbot,history]) #Press enter to submit
|
63 |
-
pedido.click(WA, inputs=history)
|
64 |
#history_box = gr.Textbox()
|
65 |
#history_button.click(history, inputs=chatbot, outputs=history_box)
|
66 |
gr.close_all()
|
|
|
32 |
|
33 |
def WA(history):
|
34 |
sendWA("573138614084",history)
|
35 |
+
return "✅ Validado"
|
36 |
+
|
37 |
|
38 |
css = """.gradio-container-3-47-1 button {font-size: 75%;}
|
39 |
.message.svelte-1pjfiar.svelte-1pjfiar.svelte-1pjfiar {padding: 5px;}
|
|
|
62 |
#history_button = gr.Button("Show history")
|
63 |
btn.click(respond, inputs=[msg, chatbot,history], outputs=[msg, chatbot,history])
|
64 |
msg.submit(respond, inputs=[msg, chatbot,history], outputs=[msg, chatbot,history]) #Press enter to submit
|
65 |
+
pedido.click(WA, inputs=history,outputs=pedido)
|
66 |
#history_box = gr.Textbox()
|
67 |
#history_button.click(history, inputs=chatbot, outputs=history_box)
|
68 |
gr.close_all()
|