Update app.py
Browse files
app.py
CHANGED
|
@@ -232,23 +232,24 @@ async def chat(query,history,audience,sources,reports):
|
|
| 232 |
except Exception as e:
|
| 233 |
print(f"Skipped adding image {i} because of {e}")
|
| 234 |
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
|
|
|
| 252 |
|
| 253 |
|
| 254 |
def save_feedback(feed: str, user_id):
|
|
|
|
| 232 |
except Exception as e:
|
| 233 |
print(f"Skipped adding image {i} because of {e}")
|
| 234 |
|
| 235 |
+
## temp removing
|
| 236 |
+
# if len(image_dict) > 0:
|
| 237 |
+
|
| 238 |
+
# gallery = [x["img"] for x in list(image_dict.values())]
|
| 239 |
+
# img = list(image_dict.values())[0]
|
| 240 |
+
# img_md = img["md"]
|
| 241 |
+
# img_caption = img["caption"]
|
| 242 |
+
# img_code = img["figure_code"]
|
| 243 |
+
# if img_code != "N/A":
|
| 244 |
+
# img_name = f"{img['key']} - {img['figure_code']}"
|
| 245 |
+
# else:
|
| 246 |
+
# img_name = f"{img['key']}"
|
| 247 |
+
|
| 248 |
+
# answer_yet = history[-1][1] + f"\n\n{img_md}\n<p class='chatbot-caption'><b>{img_name}</b> - {img_caption}</p>"
|
| 249 |
+
# history[-1] = (history[-1][0],answer_yet)
|
| 250 |
+
# history = [tuple(x) for x in history]
|
| 251 |
+
|
| 252 |
+
# yield history,docs_html,output_query,output_language,gallery#,output_query,output_keywords
|
| 253 |
|
| 254 |
|
| 255 |
def save_feedback(feed: str, user_id):
|