Update app.py
Browse files
app.py
CHANGED
|
@@ -84,8 +84,7 @@ def astro_assistant(message, history=[]):
|
|
| 84 |
if response.status_code != 200:
|
| 85 |
return f"Ошибка HF API: {response.status_code}\n{response.text}", history
|
| 86 |
data = response.json()
|
| 87 |
-
reply = data.get("generated_text","Ответ не получен,попробуйте иначе переформулировать вопрос.
|
| 88 |
-
")
|
| 89 |
history = history + [[message, reply]]
|
| 90 |
return reply, history
|
| 91 |
except Exception as e:
|
|
|
|
| 84 |
if response.status_code != 200:
|
| 85 |
return f"Ошибка HF API: {response.status_code}\n{response.text}", history
|
| 86 |
data = response.json()
|
| 87 |
+
reply = data.get("generated_text","Ответ не получен,попробуйте иначе переформулировать вопрос. ")
|
|
|
|
| 88 |
history = history + [[message, reply]]
|
| 89 |
return reply, history
|
| 90 |
except Exception as e:
|