Update app.py
Browse files
app.py
CHANGED
@@ -348,17 +348,16 @@ Name: {st.session_state.patient_info['name']}
|
|
348 |
Age: {st.session_state.patient_info['age']}
|
349 |
Gender: {st.session_state.patient_info['gender']}
|
350 |
Main Symptom: {st.session_state.patient_info['main_symptom']}
|
351 |
-
|
352 |
Symptom Details:
|
353 |
{symptom_log}
|
354 |
-
|
355 |
Medical History: {st.session_state.patient_info.get('medical_history', 'N/A')}
|
356 |
Medications: {st.session_state.patient_info.get('medications', 'N/A')}
|
357 |
Allergies: {st.session_state.patient_info.get('allergies', 'N/A')}
|
358 |
"""
|
359 |
|
360 |
# Risk analysis
|
361 |
-
|
|
|
362 |
analysis_results = analysis_system.analyze_patient_data(patient_profile)
|
363 |
|
364 |
# Store the analysis results in session state
|
@@ -507,6 +506,7 @@ def schedule_appointment():
|
|
507 |
summary,
|
508 |
"appointment_confirmation.txt",
|
509 |
help="Save your appointment details")
|
|
|
510 |
def main():
|
511 |
st.title("🏥 AI Medical Consultancy")
|
512 |
|
@@ -546,5 +546,5 @@ def main():
|
|
546 |
if st.sidebar.checkbox("Show Session State (Debug)"):
|
547 |
st.sidebar.write(st.session_state)
|
548 |
|
549 |
-
if __name__ ==
|
550 |
main()
|
|
|
348 |
Age: {st.session_state.patient_info['age']}
|
349 |
Gender: {st.session_state.patient_info['gender']}
|
350 |
Main Symptom: {st.session_state.patient_info['main_symptom']}
|
|
|
351 |
Symptom Details:
|
352 |
{symptom_log}
|
|
|
353 |
Medical History: {st.session_state.patient_info.get('medical_history', 'N/A')}
|
354 |
Medications: {st.session_state.patient_info.get('medications', 'N/A')}
|
355 |
Allergies: {st.session_state.patient_info.get('allergies', 'N/A')}
|
356 |
"""
|
357 |
|
358 |
# Risk analysis
|
359 |
+
dataset_path = "DATASET.csv" # Ensure this path is correct
|
360 |
+
analysis_system = MedicalAnalysisSystem(dataset_path)
|
361 |
analysis_results = analysis_system.analyze_patient_data(patient_profile)
|
362 |
|
363 |
# Store the analysis results in session state
|
|
|
506 |
summary,
|
507 |
"appointment_confirmation.txt",
|
508 |
help="Save your appointment details")
|
509 |
+
|
510 |
def main():
|
511 |
st.title("🏥 AI Medical Consultancy")
|
512 |
|
|
|
546 |
if st.sidebar.checkbox("Show Session State (Debug)"):
|
547 |
st.sidebar.write(st.session_state)
|
548 |
|
549 |
+
if __name__ == "__main__":
|
550 |
main()
|