Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -32,12 +32,12 @@ def start_bot(userid, password, api_key_input):
|
|
32 |
|
33 |
|
34 |
def answer(message, history):
|
|
|
|
|
|
|
35 |
answer_md, tables_display, images_display, retrieved_display = bot.get_answer(message)
|
36 |
|
37 |
-
# Combine all parts into a single response string for chat
|
38 |
combined_response = f"{answer_md}\n\n{tables_display}"
|
39 |
-
|
40 |
-
# Add images as markdown
|
41 |
if images_display:
|
42 |
combined_response += "\n\n" + "\n\n".join(images_display)
|
43 |
|
|
|
32 |
|
33 |
|
34 |
def answer(message, history):
|
35 |
+
if bot is None:
|
36 |
+
return "❗ Please log in first to use the bot."
|
37 |
+
|
38 |
answer_md, tables_display, images_display, retrieved_display = bot.get_answer(message)
|
39 |
|
|
|
40 |
combined_response = f"{answer_md}\n\n{tables_display}"
|
|
|
|
|
41 |
if images_display:
|
42 |
combined_response += "\n\n" + "\n\n".join(images_display)
|
43 |
|