Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,15 +9,15 @@ from dotenv import load_dotenv
|
|
| 9 |
load_dotenv()
|
| 10 |
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
| 11 |
input_prompt="""
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
"""
|
| 22 |
|
| 23 |
|
|
@@ -54,7 +54,7 @@ gr.Interface(
|
|
| 54 |
fn=predict_crop_health,
|
| 55 |
inputs=inputs,
|
| 56 |
outputs=gr.Textbox(label="Crop Disease Predictor"),
|
| 57 |
-
title="
|
| 58 |
-
description="Upload
|
| 59 |
live=False
|
| 60 |
).launch()
|
|
|
|
| 9 |
load_dotenv()
|
| 10 |
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
| 11 |
input_prompt="""
|
| 12 |
+
You are an expert in computer vision and soil analysis who can easily predict the quality and condition of soil."
|
| 13 |
+
"Analyze the following image and provide 7 short outputs in a structured format:"
|
| 14 |
+
"1. Soil Type: ,"
|
| 15 |
+
"2. Quality (Good or Poor): ,"
|
| 16 |
+
"3. Possible Issues (if any): ,"
|
| 17 |
+
"4. Confidence Level out of 100% whether the soil is healthy or degraded: ,"
|
| 18 |
+
"5. Reason for the issue (such as nutrient deficiency, waterlogging, soil compaction, etc.): ,"
|
| 19 |
+
"6. Soil Moisture Level: ,"
|
| 20 |
+
"7. Recommended Treatment (fertilizers, compost, irrigation advice, etc.):"
|
| 21 |
"""
|
| 22 |
|
| 23 |
|
|
|
|
| 54 |
fn=predict_crop_health,
|
| 55 |
inputs=inputs,
|
| 56 |
outputs=gr.Textbox(label="Crop Disease Predictor"),
|
| 57 |
+
title="Soil Type Classifier",
|
| 58 |
+
description="Upload The Image Of Soil",
|
| 59 |
live=False
|
| 60 |
).launch()
|