Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,13 +52,14 @@ def generate_trip_plan(user_input):
|
|
| 52 |
chat_session=model.start_chat(history=messages)
|
| 53 |
try:
|
| 54 |
response=chat_session.send_message(user_input)
|
| 55 |
-
|
| 56 |
recommendations=response.text.strip()
|
| 57 |
plain_text_recommendations=markdown(recommendations)
|
| 58 |
|
| 59 |
conversation_history.append({"role": "assistant","parts": [plain_text_recommendations]})
|
| 60 |
return plain_text_recommendations
|
| 61 |
except Exception as e:
|
|
|
|
| 62 |
return f"Luka is not available at the moment. Please try again later"
|
| 63 |
|
| 64 |
demo = gr.Interface(
|
|
|
|
| 52 |
chat_session=model.start_chat(history=messages)
|
| 53 |
try:
|
| 54 |
response=chat_session.send_message(user_input)
|
| 55 |
+
print("Response:",response.text)
|
| 56 |
recommendations=response.text.strip()
|
| 57 |
plain_text_recommendations=markdown(recommendations)
|
| 58 |
|
| 59 |
conversation_history.append({"role": "assistant","parts": [plain_text_recommendations]})
|
| 60 |
return plain_text_recommendations
|
| 61 |
except Exception as e:
|
| 62 |
+
print("Error:",e)
|
| 63 |
return f"Luka is not available at the moment. Please try again later"
|
| 64 |
|
| 65 |
demo = gr.Interface(
|