Emmanuel Frimpong Asante
commited on
Commit
·
ac8716a
1
Parent(s):
0c971f5
"Update space"
Browse filesSigned-off-by: Emmanuel Frimpong Asante <[email protected]>
app.py
CHANGED
@@ -81,8 +81,19 @@ class PoultryFarmBot:
|
|
81 |
status = result.get(indx, "unknown condition")
|
82 |
recom = recommend.get(indx, "no recommendation available")
|
83 |
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
# Diagnose Disease Using Fecal Image
|
88 |
def diagnose_disease(self, image):
|
|
|
81 |
status = result.get(indx, "unknown condition")
|
82 |
recom = recommend.get(indx, "no recommendation available")
|
83 |
|
84 |
+
# Generate additional information about the disease using Llama 2
|
85 |
+
detailed_response = self.generate_disease_response(name, status, recom)
|
86 |
+
return detailed_response, name, status, recom
|
87 |
+
|
88 |
+
# Generate a detailed response using Llama 2 for disease information and recommendations
|
89 |
+
def generate_disease_response(self, disease_name, status, recommendation):
|
90 |
+
prompt = (
|
91 |
+
f"The detected disease is {disease_name}. The condition is {status}. "
|
92 |
+
f"The recommended action is {recommendation}. "
|
93 |
+
"Provide detailed information about this disease, including causes, symptoms, "
|
94 |
+
"and how it can be effectively managed or treated on a poultry farm."
|
95 |
+
)
|
96 |
+
return llama2_response(prompt)
|
97 |
|
98 |
# Diagnose Disease Using Fecal Image
|
99 |
def diagnose_disease(self, image):
|