Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,6 +39,8 @@ def respond(message, history, max_tokens, temperature, top_p, hf_token: gr.OAuth
|
|
| 39 |
):
|
| 40 |
response += msg
|
| 41 |
yield response
|
|
|
|
|
|
|
| 42 |
|
| 43 |
# 3. Interfaz gráfica
|
| 44 |
chatbot = gr.ChatInterface(
|
|
@@ -55,6 +57,7 @@ chatbot = gr.ChatInterface(
|
|
| 55 |
["¿Qué servicios ofrecéis?"],
|
| 56 |
["¿Dónde estáis ubicados?"]
|
| 57 |
],
|
|
|
|
| 58 |
)
|
| 59 |
|
| 60 |
with gr.Blocks() as demo:
|
|
|
|
| 39 |
):
|
| 40 |
response += msg
|
| 41 |
yield response
|
| 42 |
+
except Exception as e:
|
| 43 |
+
yield f"⚠️ Ha ocurrido un error técnico con el modelo: {str(e)}"
|
| 44 |
|
| 45 |
# 3. Interfaz gráfica
|
| 46 |
chatbot = gr.ChatInterface(
|
|
|
|
| 57 |
["¿Qué servicios ofrecéis?"],
|
| 58 |
["¿Dónde estáis ubicados?"]
|
| 59 |
],
|
| 60 |
+
cache_examples=False,
|
| 61 |
)
|
| 62 |
|
| 63 |
with gr.Blocks() as demo:
|