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 |
|