BenK0y commited on
Commit
43c1328
·
verified ·
1 Parent(s): 39cbd9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,10 +1,11 @@
1
  import google.generativeai as genai
2
- import PIL.Image
3
  import os
4
 
5
  genai.configure(api_key=os.environ["AIzaSyCNHU0pNRGJvVgbFfXbFIdvgYBm9rgWfoY"])
6
- img = PIL.Image.open('car.png')
7
 
8
- model = genai.GenerativeModel(model_name="gemini-1.5-flash")
9
- response = model.generate_content(["What is in this photo?", img])
10
- print(response)
 
 
 
 
1
  import google.generativeai as genai
 
2
  import os
3
 
4
  genai.configure(api_key=os.environ["AIzaSyCNHU0pNRGJvVgbFfXbFIdvgYBm9rgWfoY"])
 
5
 
6
+ model = genai.GenerativeModel('gemini-1.5-flash')
7
+ response = model.generate_content(
8
+ text_input="the color of the car is ?",
9
+ image_input="car.jpg"
10
+ )
11
+ print(response)