Update app.py
Browse files
app.py
CHANGED
@@ -58,13 +58,13 @@ def model(text, conversation):
|
|
58 |
output = response["choices"][0]["message"]['content']
|
59 |
return output
|
60 |
|
61 |
-
# Funci贸n de interacci贸n con el chatbot usando Gradio
|
62 |
def interact_with_chatbot(text, conversation):
|
63 |
# Procesar el mensaje a trav茅s del modelo
|
64 |
response = model(text, conversation)
|
65 |
|
66 |
-
# Devolver la respuesta generada
|
67 |
-
|
|
|
68 |
|
69 |
# Lanzar la interfaz Gradio con ChatInterface
|
70 |
|
|
|
58 |
output = response["choices"][0]["message"]['content']
|
59 |
return output
|
60 |
|
|
|
61 |
def interact_with_chatbot(text, conversation):
|
62 |
# Procesar el mensaje a trav茅s del modelo
|
63 |
response = model(text, conversation)
|
64 |
|
65 |
+
# Devolver la respuesta generada y el estado de la conversaci贸n (como lista)
|
66 |
+
conversation.append((text, response)) # Agregar interacci贸n a la lista
|
67 |
+
return response, conversation
|
68 |
|
69 |
# Lanzar la interfaz Gradio con ChatInterface
|
70 |
|