MayankGupta06 commited on
Commit
e8b3c3f
Β·
verified Β·
1 Parent(s): c29cd9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -5
app.py CHANGED
@@ -252,11 +252,11 @@ llm = ChatGoogleGenerativeAI(
252
  )
253
 
254
  # Streamlit UI
255
- st.title("🩺 AI Healthcare Learning Assistant")
256
- st.write("Get medicine recommendations and alternative treatments for learning purposes.")
257
 
258
  # User Input
259
- user_question = st.text_input("Enter your health-related query:")
260
 
261
  # Function to filter AI disclaimers
262
  def is_valid_response(response_text):
@@ -287,10 +287,10 @@ if st.button("Get Recommendation"):
287
 
288
  # Check if response is valid
289
  if is_valid_response(response_text):
290
- st.success("Here is the relevant information:")
291
  st.write(response_text)
292
  else:
293
- st.warning("AI provided a disclaimer. Trying again...")
294
  # Retry with a refined prompt
295
  better_prompt = (
296
  f"Strictly provide a detailed answer including:\n"
@@ -316,7 +316,18 @@ if st.button("Get Recommendation"):
316
  else:
317
  st.warning("Please enter a question!")
318
 
 
 
 
 
 
 
 
 
 
 
319
  # Footer
320
  st.markdown("---")
321
  st.markdown("πŸ’‘ *This AI provides learning-based medical insights, not actual medical advice.*")
 
322
 
 
252
  )
253
 
254
  # Streamlit UI
255
+ st.title("🩺 CureBot: AI-Driven Health Assistant")
256
+ st.write("Welcome to CureBot – Your AI-Driven Health Assistant! Simply enter your symptoms or disease name, and get accurate medicine suggestions instantly. Stay informed, stay healthy!")
257
 
258
  # User Input
259
+ user_question = st.text_input("Type your symptoms or disease name, and let CureBot unlock the right cure for youβ€”fast, smart, and AI-powered")
260
 
261
  # Function to filter AI disclaimers
262
  def is_valid_response(response_text):
 
287
 
288
  # Check if response is valid
289
  if is_valid_response(response_text):
290
+ st.success("✨ Analysis complete! Here are the best medicine recommendations for you: πŸ”½")
291
  st.write(response_text)
292
  else:
293
+ st.warning("⚠️ Oops! It looks like the input is unclear or incorrect. Please enter a valid disease name or symptoms to get accurate recommendations")
294
  # Retry with a refined prompt
295
  better_prompt = (
296
  f"Strictly provide a detailed answer including:\n"
 
316
  else:
317
  st.warning("Please enter a question!")
318
 
319
+
320
+ # Emergency Contact Button
321
+ if st.button("Emergency Contact"):
322
+ st.subheader("πŸ“ž Emergency Contacts")
323
+ st.write("- πŸš‘ *Ambulance:* 102")
324
+ st.write("- πŸ”₯ *LPU Hospital:* 18001024432")
325
+ st.write("- πŸ₯ *National Health Helpline:* 108")
326
+ st.write("- ☎ *COVID-19 Helpline:* 1075")
327
+ st.write("- πŸš“ *Police:* 100")
328
+
329
  # Footer
330
  st.markdown("---")
331
  st.markdown("πŸ’‘ *This AI provides learning-based medical insights, not actual medical advice.*")
332
+ st.markdown("πŸ”Ή Powered by Mayank, Wasim, Pravishank – Innovating Healthcare with AI! πŸ’‘ Your Health, Our Mission. πŸš€")
333