Sebbe33 commited on
Commit
91b6e57
·
verified ·
1 Parent(s): ce07890

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -58,11 +58,19 @@ if uploaded_file and st.button("Analyze"):
58
  img_byte_arr = io.BytesIO()
59
  image.save(img_byte_arr, format='PNG')
60
 
 
61
  # Get bounding boxes
62
  response = client.models.generate_content(
63
- model="gemini-1.5-pro-latest", # Try newer model
64
- contents=[DETECTION_PROMPT, types.Part.from_bytes(img_byte_arr.getvalue(), "image/png")]
 
 
 
 
 
 
65
  )
 
66
 
67
  # Debug output
68
  with st.expander("Raw API Response"):
 
58
  img_byte_arr = io.BytesIO()
59
  image.save(img_byte_arr, format='PNG')
60
 
61
+
62
  # Get bounding boxes
63
  response = client.models.generate_content(
64
+ model="gemini-2.0-flash-exp",
65
+ contents=[
66
+ DETECTION_PROMPT,
67
+ types.Part.from_bytes(
68
+ data=img_byte_arr.getvalue(),
69
+ mime_type="image/png"
70
+ )
71
+ ]
72
  )
73
+
74
 
75
  # Debug output
76
  with st.expander("Raw API Response"):