Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ def __init__(self):
|
|
| 23 |
self.patient_data = {}
|
| 24 |
|
| 25 |
@tool
|
| 26 |
-
def collect_symptoms(self, patient_id: str, symptoms: str) -> str:
|
| 27 |
"""
|
| 28 |
Nurse tool to collect symptoms and ask follow-up questions.
|
| 29 |
|
|
@@ -59,7 +59,7 @@ def collect_symptoms(self, patient_id: str, symptoms: str) -> str:
|
|
| 59 |
return f"Unexpected Error: {str(e)}"
|
| 60 |
|
| 61 |
@tool
|
| 62 |
-
def diagnose_patient(self, patient_id: str) -> str:
|
| 63 |
"""
|
| 64 |
Doctor tool to diagnose the patient based on symptoms.
|
| 65 |
|
|
@@ -89,7 +89,7 @@ def diagnose_patient(self, patient_id: str) -> str:
|
|
| 89 |
return f"Unexpected Error: {str(e)}"
|
| 90 |
|
| 91 |
@tool
|
| 92 |
-
def fetch_diagnosis(self, symptoms: str) -> str:
|
| 93 |
"""
|
| 94 |
AI tool to retrieve a diagnosis based on symptoms.
|
| 95 |
|
|
@@ -113,7 +113,7 @@ def fetch_diagnosis(self, symptoms: str) -> str:
|
|
| 113 |
return f"Unexpected Error: {str(e)}"
|
| 114 |
|
| 115 |
@tool
|
| 116 |
-
def fetch_medication(self, symptoms: str) -> str:
|
| 117 |
"""
|
| 118 |
AI tool to suggest medications based on symptoms.
|
| 119 |
|
|
@@ -137,7 +137,7 @@ def fetch_medication(self, symptoms: str) -> str:
|
|
| 137 |
return f"Unexpected Error: {str(e)}"
|
| 138 |
|
| 139 |
@tool
|
| 140 |
-
def fetch_treatment_advice(self, symptoms: str) -> str:
|
| 141 |
"""
|
| 142 |
AI tool to provide treatment recommendations.
|
| 143 |
|
|
|
|
| 23 |
self.patient_data = {}
|
| 24 |
|
| 25 |
@tool
|
| 26 |
+
def collect_symptoms(self: Self, patient_id: str, symptoms: str) -> str:
|
| 27 |
"""
|
| 28 |
Nurse tool to collect symptoms and ask follow-up questions.
|
| 29 |
|
|
|
|
| 59 |
return f"Unexpected Error: {str(e)}"
|
| 60 |
|
| 61 |
@tool
|
| 62 |
+
def diagnose_patient(self: Self, patient_id: str) -> str:
|
| 63 |
"""
|
| 64 |
Doctor tool to diagnose the patient based on symptoms.
|
| 65 |
|
|
|
|
| 89 |
return f"Unexpected Error: {str(e)}"
|
| 90 |
|
| 91 |
@tool
|
| 92 |
+
def fetch_diagnosis(self: Self, symptoms: str) -> str:
|
| 93 |
"""
|
| 94 |
AI tool to retrieve a diagnosis based on symptoms.
|
| 95 |
|
|
|
|
| 113 |
return f"Unexpected Error: {str(e)}"
|
| 114 |
|
| 115 |
@tool
|
| 116 |
+
def fetch_medication(self: Self, symptoms: str) -> str:
|
| 117 |
"""
|
| 118 |
AI tool to suggest medications based on symptoms.
|
| 119 |
|
|
|
|
| 137 |
return f"Unexpected Error: {str(e)}"
|
| 138 |
|
| 139 |
@tool
|
| 140 |
+
def fetch_treatment_advice(self: Self, symptoms: str) -> str:
|
| 141 |
"""
|
| 142 |
AI tool to provide treatment recommendations.
|
| 143 |
|