Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,48 +25,11 @@ def analyze(
|
|
| 25 |
"You are an advanced AI medical assistant. "
|
| 26 |
"Analyze the patientβs biomarkers and demographics. "
|
| 27 |
"Provide a structured assessment including: "
|
| 28 |
-
"patient_profile, lab_results, risk_assessment, clinical_impression
|
| 29 |
)
|
| 30 |
|
| 31 |
# Construct patient profile input
|
| 32 |
patient_input = f"""
|
| 33 |
-
You are a professional AI Medical Assistant.
|
| 34 |
-
You are analyzing patient demographics and *Levine biomarker panel* values.
|
| 35 |
-
Output MUST strictly follow this structured format:
|
| 36 |
-
|
| 37 |
-
1. Executive Summary
|
| 38 |
-
- Longevity Vitality Score (out of 100)
|
| 39 |
-
- Top Priority Issues
|
| 40 |
-
- Key Strengths
|
| 41 |
-
|
| 42 |
-
2. System-Specific Analysis
|
| 43 |
-
- Blood Health (MCV, RDW, Lymphocytes, WBC)
|
| 44 |
-
- Protein & Liver Health (Albumin, ALP)
|
| 45 |
-
- Kidney Health (Creatinine Β΅mol/L)
|
| 46 |
-
- Metabolic Health (Glucose mmol/L, lnCRP)
|
| 47 |
-
- Other relevant systems
|
| 48 |
-
|
| 49 |
-
3. Personalized Action Plan
|
| 50 |
-
- Medical (tests/consults)
|
| 51 |
-
- Nutrition (diet & supplements)
|
| 52 |
-
- Lifestyle (hydration, exercise, sleep)
|
| 53 |
-
- Testing (follow-up labs: ferritin, Vitamin D, GGT)
|
| 54 |
-
|
| 55 |
-
4. Interaction Alerts
|
| 56 |
-
- How biomarkers interact (e.g., anemia β infection cycle, ALP with bone/liver origin)
|
| 57 |
-
|
| 58 |
-
5. Longevity Metrics
|
| 59 |
-
- Metabolic Health Score
|
| 60 |
-
- Cardiovascular & Cognitive risk trajectory
|
| 61 |
-
|
| 62 |
-
6. Tabular Mapping (Biomarker β Value β Status β AI-Inferred Insight β Client-Friendly Message)
|
| 63 |
-
|
| 64 |
-
7. Enhanced AI Insights & Longitudinal Risk
|
| 65 |
-
- Subclinical nutrient predictions (Iron, B12, Folate, Copper)
|
| 66 |
-
- Elevated ALP interpretation (bone vs liver origin)
|
| 67 |
-
- WBC & lymphocyte trends for immunity
|
| 68 |
-
- Predictive longevity risk profile
|
| 69 |
-
|
| 70 |
Patient Profile:
|
| 71 |
- Age: {age}
|
| 72 |
- Gender: {gender}
|
|
|
|
| 25 |
"You are an advanced AI medical assistant. "
|
| 26 |
"Analyze the patientβs biomarkers and demographics. "
|
| 27 |
"Provide a structured assessment including: "
|
| 28 |
+
"patient_profile, lab_results, risk_assessment, clinical_impression,, recommendations, longitivity metrics and their executive summary "
|
| 29 |
)
|
| 30 |
|
| 31 |
# Construct patient profile input
|
| 32 |
patient_input = f"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
Patient Profile:
|
| 34 |
- Age: {age}
|
| 35 |
- Gender: {gender}
|