Spaces:
Sleeping
Sleeping
Lautaro Cardarelli
commited on
Commit
·
a58d979
1
Parent(s):
b9ce672
add chatbot interface
Browse files
app.py
CHANGED
@@ -106,3 +106,20 @@ questions_output = gr.Textbox(label="Preguntas", lines=5)
|
|
106 |
|
107 |
demo = gr.Interface(fn=process, inputs=textbox_input, outputs=[summary_output, questions_output])
|
108 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
demo = gr.Interface(fn=process, inputs=textbox_input, outputs=[summary_output, questions_output])
|
108 |
demo.launch()
|
109 |
+
|
110 |
+
|
111 |
+
def chatbot_response(user_input):
|
112 |
+
return f"Chatbot dice: {user_input}"
|
113 |
+
|
114 |
+
|
115 |
+
chat_input = gr.Textbox(label="Pregunta sobre el texto:", placeholder="Mensaje...", lines=5)
|
116 |
+
chat_output = gr.Textbox(label="Chatbot", lines=10)
|
117 |
+
|
118 |
+
chatbot_interface = gr.Interface(
|
119 |
+
fn=chatbot_response,
|
120 |
+
inputs=chat_input,
|
121 |
+
outputs=chat_output,
|
122 |
+
title="Chatbot"
|
123 |
+
)
|
124 |
+
|
125 |
+
chatbot_interface.launch()
|