Spaces:
Sleeping
Sleeping
revert
Browse files
app.py
CHANGED
|
@@ -355,26 +355,25 @@ async def on_chat_start():
|
|
| 355 |
collection_name="fda_drugs" # Name of the collection in Qdrant
|
| 356 |
)
|
| 357 |
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
cl.user_session.set("potential_questions_shown", True)
|
| 378 |
|
| 379 |
|
| 380 |
|
|
@@ -388,6 +387,7 @@ async def main(message):
|
|
| 388 |
"""
|
| 389 |
query = message.content
|
| 390 |
|
|
|
|
| 391 |
try:
|
| 392 |
answer, text_elements, related_question_actions, related_papers, original_query = await generate_answer(query)
|
| 393 |
|
|
|
|
| 355 |
collection_name="fda_drugs" # Name of the collection in Qdrant
|
| 356 |
)
|
| 357 |
|
| 358 |
+
|
| 359 |
+
potential_questions = [
|
| 360 |
+
"What should I be careful of when taking Metformin?",
|
| 361 |
+
"What are the contraindications of Aspirin?",
|
| 362 |
+
"Are there low-cost alternatives to branded Aspirin available over-the-counter?",
|
| 363 |
+
"What precautions should I take if I'm pregnant or nursing while on Lipitor?",
|
| 364 |
+
"Should Lipitor be taken at a specific time of day, and does it need to be taken with food?",
|
| 365 |
+
"What is the recommended dose of Aspirin?",
|
| 366 |
+
"Can older people take beta blockers?",
|
| 367 |
+
"How do beta blockers work?",
|
| 368 |
+
"Can beta blockers be used for anxiety?",
|
| 369 |
+
"I am taking Aspirin, is it ok to take Glipizide?",
|
| 370 |
+
"Explain in simple terms how Metformin works?"
|
| 371 |
+
]
|
| 372 |
+
await cl.Message(
|
| 373 |
+
content="**Welcome to PharmAssistAI ! Here are some potential questions you can ask:**",
|
| 374 |
+
actions=[cl.Action(name="ask_question", value=question, label=question) for question in potential_questions]
|
| 375 |
+
).send()
|
| 376 |
+
cl.user_session.set("potential_questions_shown", True)
|
|
|
|
| 377 |
|
| 378 |
|
| 379 |
|
|
|
|
| 387 |
"""
|
| 388 |
query = message.content
|
| 389 |
|
| 390 |
+
|
| 391 |
try:
|
| 392 |
answer, text_elements, related_question_actions, related_papers, original_query = await generate_answer(query)
|
| 393 |
|