Update app.py
Browse files
app.py
CHANGED
@@ -252,11 +252,11 @@ llm = ChatGoogleGenerativeAI(
|
|
252 |
)
|
253 |
|
254 |
# Streamlit UI
|
255 |
-
st.title("π©Ί AI
|
256 |
-
st.write("
|
257 |
|
258 |
# User Input
|
259 |
-
user_question = st.text_input("
|
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
|
291 |
st.write(response_text)
|
292 |
else:
|
293 |
-
st.warning("
|
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 |
|