amirkhanbloch commited on
Commit
c0693eb
·
verified ·
1 Parent(s): d5c4bde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,13 +1,13 @@
1
  import gradio as gr
2
- from google.generativeai import generative_language_v1beta
3
 
4
- # Initialize the model
5
- model = generative_language_v1beta.GenerativeModel(model_name="gemini-1.5-flash")
6
 
7
  def get_gemini_response(image_data):
8
  input_prompt = "Analyze the uploaded plant image."
9
 
10
- # Use the model to 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
 
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