Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def classify_urgency(symptoms: str) -> str:
|
|
| 19 |
model="claude-sonnet-4-20250514",
|
| 20 |
#model="claude-3-sonnet-20240229",
|
| 21 |
max_tokens=150,
|
| 22 |
-
temperature=0.
|
| 23 |
system="You are a medical triage assistant. Provide clear, concise classifications.",
|
| 24 |
messages=[{"role": "user", "content": prompt}]
|
| 25 |
)
|
|
@@ -31,27 +31,28 @@ def get_possible_conditions(symptoms: str) -> str:
|
|
| 31 |
message = client.messages.create(
|
| 32 |
model="claude-sonnet-4-20250514",
|
| 33 |
#model="claude-3-sonnet-20240229",
|
| 34 |
-
max_tokens=
|
| 35 |
-
temperature=0.
|
| 36 |
system="You are a medical assistant. Provide clear, non-technical explanations of possible conditions.",
|
| 37 |
messages=[{"role": "user", "content": prompt}]
|
| 38 |
)
|
| 39 |
return message.content[0].text
|
| 40 |
|
| 41 |
def lookup_clinics(city: str) -> str:
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
| 55 |
|
| 56 |
def process_input(symptoms: str, city: str) -> tuple:
|
| 57 |
"""Process the input and return all results."""
|
|
|
|
| 19 |
model="claude-sonnet-4-20250514",
|
| 20 |
#model="claude-3-sonnet-20240229",
|
| 21 |
max_tokens=150,
|
| 22 |
+
temperature=0.05,
|
| 23 |
system="You are a medical triage assistant. Provide clear, concise classifications.",
|
| 24 |
messages=[{"role": "user", "content": prompt}]
|
| 25 |
)
|
|
|
|
| 31 |
message = client.messages.create(
|
| 32 |
model="claude-sonnet-4-20250514",
|
| 33 |
#model="claude-3-sonnet-20240229",
|
| 34 |
+
max_tokens=400,
|
| 35 |
+
temperature=0.05,
|
| 36 |
system="You are a medical assistant. Provide clear, non-technical explanations of possible conditions.",
|
| 37 |
messages=[{"role": "user", "content": prompt}]
|
| 38 |
)
|
| 39 |
return message.content[0].text
|
| 40 |
|
| 41 |
def lookup_clinics(city: str) -> str:
|
| 42 |
+
return "Clinic Lookup will be back soon"
|
| 43 |
+
# try:
|
| 44 |
+
# response = requests.get(MODAL_CLINIC_ENDPOINT, params={"city": city}, timeout=20)
|
| 45 |
+
# response.raise_for_status()
|
| 46 |
+
# clinics = response.json()
|
| 47 |
+
# if clinics and isinstance(clinics, list) and "error" not in clinics[0]:
|
| 48 |
+
# return "\n\n".join([
|
| 49 |
+
# f"๐ฅ {clinic['name']}\n๐ {clinic['link']}\n๐ {clinic['description']}"
|
| 50 |
+
# for clinic in clinics
|
| 51 |
+
# ])
|
| 52 |
+
# else:
|
| 53 |
+
# return clinics[0].get("error", "No clinics found.")
|
| 54 |
+
# except Exception as e:
|
| 55 |
+
# return f"Error finding clinics: {str(e)}"
|
| 56 |
|
| 57 |
def process_input(symptoms: str, city: str) -> tuple:
|
| 58 |
"""Process the input and return all results."""
|