File size: 739 Bytes
d137d7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
import subprocess

# 🔹 Force install missing dependencies
missing_packages = ["xgboost"]
for package in missing_packages:
    try:
        __import__(package)
    except ImportError:
        subprocess.call(["pip", "install", package])

from virtualhealth import handle_user_query  # Now import your function
import streamlit as st

st.set_page_config(page_title="AI Health Assistant", page_icon="🩺")

st.title("🩺 AI Health Assistant")
st.write("Ask any medical-related questions below:")

# User Input
user_input = st.text_input("Your Question:")

# Button to Process Query
if st.button("Ask"):
    bot_response = handle_user_query(user_input)  # Call function directly
    st.markdown(f"**🤖 Bot:** {bot_response}")