update prompt
Browse files
app.py
CHANGED
@@ -17,18 +17,23 @@ genai.configure(api_key=api_key)
|
|
17 |
labels = ['cataract', 'diabetic_retinopathy', 'glaucoma', 'normal']
|
18 |
|
19 |
def get_disease_detail(disease_name):
|
20 |
-
if disease_name == "normal":
|
21 |
-
prompt = (
|
22 |
-
|
23 |
-
)
|
24 |
-
else:
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
32 |
try:
|
33 |
response = genai.GenerativeModel("gemini-1.5-flash").generate_content(prompt)
|
34 |
return markdown2.markdown(response.text.strip())
|
|
|
17 |
labels = ['cataract', 'diabetic_retinopathy', 'glaucoma', 'normal']
|
18 |
|
19 |
def get_disease_detail(disease_name):
|
20 |
+
# if disease_name == "normal":
|
21 |
+
# prompt = (
|
22 |
+
# "Create a text that congratulates having healthy eyes and gives bullet point tips to keep eyes healthy."
|
23 |
+
# )
|
24 |
+
# else:
|
25 |
+
prompt = (
|
26 |
+
"You are an Ophthalmologist with over 25 years of experience,
|
27 |
+
you have treated thousands of patients with various eye diseases including cataracts,
|
28 |
+
diabetic retinopathy and glaucoma. The entire medical process from disease identification
|
29 |
+
to patient management is second nature to you and you are used to it.
|
30 |
+
Your job is to critically and comprehensively make recommendations based on the diagnosis,
|
31 |
+
the recommendations contain actions that can be taken on the patient, no need to re-explain
|
32 |
+
the disease. In every recommendation you must remind the patient to always see the Ophthalmologist
|
33 |
+
to validate the diagnosis and recommendation.\n"
|
34 |
+
|
35 |
+
f"The diagnosis is {disease_name}, what are your recommendations?"
|
36 |
+
)
|
37 |
try:
|
38 |
response = genai.GenerativeModel("gemini-1.5-flash").generate_content(prompt)
|
39 |
return markdown2.markdown(response.text.strip())
|