Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
-
from google.generativeai import
|
3 |
|
4 |
-
# Initialize the model
|
5 |
-
model =
|
6 |
|
7 |
def get_gemini_response(image_data):
|
8 |
input_prompt = "Analyze the uploaded plant image."
|
9 |
|
10 |
-
#
|
11 |
response = model.generate_content([input_prompt, image_data])
|
12 |
|
13 |
# Process the response to extract relevant information
|
|
|
1 |
import gradio as gr
|
2 |
+
from google.generativeai import GenerativeModel # Adjust this based on available imports
|
3 |
|
4 |
+
# Initialize the model (check the correct model name from the documentation)
|
5 |
+
model = GenerativeModel(model_name="gemini-1.5-flash") # Adjust based on actual available model names
|
6 |
|
7 |
def get_gemini_response(image_data):
|
8 |
input_prompt = "Analyze the uploaded plant image."
|
9 |
|
10 |
+
# Generate a response based on the uploaded image
|
11 |
response = model.generate_content([input_prompt, image_data])
|
12 |
|
13 |
# Process the response to extract relevant information
|