Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ def get_diagnosis(age, gender, symptoms, medical_history):
|
|
| 54 |
"content": prompt,
|
| 55 |
}
|
| 56 |
],
|
| 57 |
-
model="
|
| 58 |
temperature=0.5,
|
| 59 |
max_tokens=1500,
|
| 60 |
)
|
|
@@ -68,7 +68,7 @@ def format_output(response):
|
|
| 68 |
if "error" in response:
|
| 69 |
return f"An error occurred: {response['error']}"
|
| 70 |
|
| 71 |
-
output = "Cancer Risk
|
| 72 |
|
| 73 |
output += "Potential Cancer Types:\n"
|
| 74 |
for cancer in response["potential_cancer_types"]:
|
|
@@ -97,9 +97,9 @@ iface = gr.Interface(
|
|
| 97 |
gr.Textbox(lines=3, label="Relevant Medical History")
|
| 98 |
],
|
| 99 |
outputs=gr.Textbox(label="Assessment Results", lines=10),
|
| 100 |
-
title="Cancer Risk
|
| 101 |
-
description="This tool
|
| 102 |
-
article="IMPORTANT:
|
| 103 |
)
|
| 104 |
|
| 105 |
# Launch the app
|
|
|
|
| 54 |
"content": prompt,
|
| 55 |
}
|
| 56 |
],
|
| 57 |
+
model="mixtral-8x7b-32768",
|
| 58 |
temperature=0.5,
|
| 59 |
max_tokens=1500,
|
| 60 |
)
|
|
|
|
| 68 |
if "error" in response:
|
| 69 |
return f"An error occurred: {response['error']}"
|
| 70 |
|
| 71 |
+
output = "HealthScan AI: Personalized Cancer Risk Insights\n\n"
|
| 72 |
|
| 73 |
output += "Potential Cancer Types:\n"
|
| 74 |
for cancer in response["potential_cancer_types"]:
|
|
|
|
| 97 |
gr.Textbox(lines=3, label="Relevant Medical History")
|
| 98 |
],
|
| 99 |
outputs=gr.Textbox(label="Assessment Results", lines=10),
|
| 100 |
+
title="HealthScan AI: Personalized Cancer Risk Insights",
|
| 101 |
+
description="This AI-powered tool provides a preliminary analysis of potential cancer risks based on the information you provide. It is designed to support early awareness and is not a substitute for professional medical advice, diagnosis, or treatment.",
|
| 102 |
+
article="IMPORTANT: HealthScan AI is for educational and informational purposes only. Always consult with a qualified healthcare provider for medical concerns. The insights provided by this tool should not be used for self-diagnosis or treatment. Early detection and regular check-ups with healthcare professionals are crucial for managing your health effectively."
|
| 103 |
)
|
| 104 |
|
| 105 |
# Launch the app
|