Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -110,26 +110,64 @@ def create_medical_report(symptoms):
|
|
110 |
st.set_page_config(page_title="MedExpert AI", layout="wide")
|
111 |
|
112 |
# Apply Tailwind CSS & Custom Styles
|
113 |
-
st.markdown(
|
114 |
-
"""
|
115 |
<style>
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
</style>
|
123 |
-
|
124 |
-
|
125 |
-
)
|
126 |
|
127 |
# Sidebar UI
|
128 |
with st.sidebar:
|
129 |
-
st.markdown("## π Navigation")
|
130 |
page = st.radio("", ["π Home", "π Diagnosis", "π’ About"])
|
131 |
st.markdown("---")
|
132 |
-
st.markdown("
|
|
|
133 |
|
134 |
# Main Page
|
135 |
st.title("π©Ί MedExpert: AI-Powered Clinical Analysis System")
|
@@ -149,11 +187,12 @@ elif page == "π Diagnosis":
|
|
149 |
st.subheader("π Describe Your Symptoms")
|
150 |
symptoms = st.text_area("Enter symptoms in any language", placeholder="e.g., Mujhay sar main dard hai")
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
|
|
157 |
|
158 |
if pdf_file:
|
159 |
st.subheader("π Medical Report")
|
|
|
110 |
st.set_page_config(page_title="MedExpert AI", layout="wide")
|
111 |
|
112 |
# Apply Tailwind CSS & Custom Styles
|
113 |
+
st.markdown("""
|
|
|
114 |
<style>
|
115 |
+
/* Background Gradient */
|
116 |
+
body {
|
117 |
+
background: linear-gradient(to right, #ff7e5f, #feb47b);
|
118 |
+
color: white;
|
119 |
+
}
|
120 |
+
|
121 |
+
/* Sidebar Design */
|
122 |
+
[data-testid="stSidebar"] {
|
123 |
+
background-color: #2C3E50 !important;
|
124 |
+
color: white !important;
|
125 |
+
}
|
126 |
+
|
127 |
+
[data-testid="stSidebar"] a {
|
128 |
+
color: white !important;
|
129 |
+
font-size: 18px !important;
|
130 |
+
}
|
131 |
+
|
132 |
+
/* Custom Buttons */
|
133 |
+
.stButton>button {
|
134 |
+
background-color: #16A085;
|
135 |
+
color: white;
|
136 |
+
padding: 10px 20px;
|
137 |
+
border-radius: 8px;
|
138 |
+
font-size: 16px;
|
139 |
+
}
|
140 |
+
|
141 |
+
.stButton>button:hover {
|
142 |
+
background-color: #1ABC9C;
|
143 |
+
}
|
144 |
+
|
145 |
+
/* Custom Input Box */
|
146 |
+
.stTextInput>div>div>input {
|
147 |
+
background-color: white !important;
|
148 |
+
border-radius: 10px !important;
|
149 |
+
border: 2px solid #16A085 !important;
|
150 |
+
padding: 8px !important;
|
151 |
+
}
|
152 |
+
|
153 |
+
/* Title Styling */
|
154 |
+
.stApp h1 {
|
155 |
+
text-align: center;
|
156 |
+
font-size: 36px;
|
157 |
+
color: #2C3E50;
|
158 |
+
}
|
159 |
+
|
160 |
</style>
|
161 |
+
""", unsafe_allow_html=True)
|
162 |
+
|
|
|
163 |
|
164 |
# Sidebar UI
|
165 |
with st.sidebar:
|
166 |
+
st.markdown("## π **Navigation**", unsafe_allow_html=True)
|
167 |
page = st.radio("", ["π Home", "π Diagnosis", "π’ About"])
|
168 |
st.markdown("---")
|
169 |
+
st.markdown("### π **Built with AI & Healthcare Experts**")
|
170 |
+
|
171 |
|
172 |
# Main Page
|
173 |
st.title("π©Ί MedExpert: AI-Powered Clinical Analysis System")
|
|
|
187 |
st.subheader("π Describe Your Symptoms")
|
188 |
symptoms = st.text_area("Enter symptoms in any language", placeholder="e.g., Mujhay sar main dard hai")
|
189 |
|
190 |
+
if st.button("π§ββοΈ Get Diagnosis"):
|
191 |
+
if symptoms.strip():
|
192 |
+
with st.spinner("π **Analyzing Symptoms... Please wait...**"):
|
193 |
+
time.sleep(2) # Simulate processing
|
194 |
+
report_text, pdf_file = create_medical_report(symptoms)
|
195 |
+
|
196 |
|
197 |
if pdf_file:
|
198 |
st.subheader("π Medical Report")
|