rajkstats commited on
Commit
1d1a7b8
·
1 Parent(s): 90e4b7e
Files changed (1) hide show
  1. app.py +20 -20
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
- if not cl.user_session.get("potential_questions_shown", False):
359
-
360
- potential_questions = [
361
- "What should I be careful of when taking Metformin?",
362
- "What are the contraindications of Aspirin?",
363
- "Are there low-cost alternatives to branded Aspirin available over-the-counter?",
364
- "What precautions should I take if I'm pregnant or nursing while on Lipitor?",
365
- "Should Lipitor be taken at a specific time of day, and does it need to be taken with food?",
366
- "What is the recommended dose of Aspirin?",
367
- "Can older people take beta blockers?",
368
- "How do beta blockers work?",
369
- "Can beta blockers be used for anxiety?",
370
- "I am taking Aspirin, is it ok to take Glipizide?",
371
- "Explain in simple terms how Metformin works?"
372
- ]
373
- await cl.Message(
374
- content="**Welcome to PharmAssistAI ! Here are some potential questions you can ask:**",
375
- actions=[cl.Action(name="ask_question", value=question, label=question) for question in potential_questions]
376
- ).send()
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