Spaces:
Build error
Build error
fix
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def interact_with_chatbot(text, conversation, name, previous_prescriptions, obra
|
|
| 40 |
return response, conversation + [(text, response)], ids
|
| 41 |
|
| 42 |
# Interfaz
|
| 43 |
-
with gr.Blocks():
|
| 44 |
gr.Markdown("## 👨⚕️ PreDoc Chatbot 📋💊")
|
| 45 |
|
| 46 |
with gr.Accordion("📝 Datos del paciente", open=True):
|
|
@@ -50,7 +50,7 @@ with gr.Blocks():
|
|
| 50 |
plan = gr.Textbox(label="Plan", placeholder="Ej: 210")
|
| 51 |
nro_afiliado = gr.Textbox(label="Número de afiliado", placeholder="Ej: 12345678")
|
| 52 |
|
| 53 |
-
chatbot = gr.Chatbot(
|
| 54 |
msg = gr.Textbox(label="Tu mensaje")
|
| 55 |
|
| 56 |
state_chat = gr.State([]) # historial de la conversación
|
|
@@ -68,4 +68,5 @@ with gr.Blocks():
|
|
| 68 |
[msg, chatbot, state_ids]
|
| 69 |
)
|
| 70 |
|
| 71 |
-
|
|
|
|
|
|
| 40 |
return response, conversation + [(text, response)], ids
|
| 41 |
|
| 42 |
# Interfaz
|
| 43 |
+
with gr.Blocks() as demo:
|
| 44 |
gr.Markdown("## 👨⚕️ PreDoc Chatbot 📋💊")
|
| 45 |
|
| 46 |
with gr.Accordion("📝 Datos del paciente", open=True):
|
|
|
|
| 50 |
plan = gr.Textbox(label="Plan", placeholder="Ej: 210")
|
| 51 |
nro_afiliado = gr.Textbox(label="Número de afiliado", placeholder="Ej: 12345678")
|
| 52 |
|
| 53 |
+
chatbot = gr.Chatbot()
|
| 54 |
msg = gr.Textbox(label="Tu mensaje")
|
| 55 |
|
| 56 |
state_chat = gr.State([]) # historial de la conversación
|
|
|
|
| 68 |
[msg, chatbot, state_ids]
|
| 69 |
)
|
| 70 |
|
| 71 |
+
if __name__ == "__main__":
|
| 72 |
+
demo.launch()
|