Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,10 @@ agent = initialize_agent(
|
|
66 |
)
|
67 |
|
68 |
def data_gov_ma(message, history):
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
71 |
|
72 |
gr.ChatInterface(data_gov_ma).launch()
|
|
|
66 |
)
|
67 |
|
68 |
def data_gov_ma(message, history):
|
69 |
+
try:
|
70 |
+
response = agent.run(message)
|
71 |
+
return response
|
72 |
+
except ValueError as e:
|
73 |
+
return "Je suis désolé, je n'ai pas compris votre question. Pourriez-vous la reformuler s'il vous plaît ?"
|
74 |
|
75 |
gr.ChatInterface(data_gov_ma).launch()
|