Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ if uploaded_file is not None:
|
|
29 |
|
30 |
|
31 |
# Anfrage an Gemini senden
|
32 |
-
client = genai.Client(api_key=os.
|
33 |
response = client.models.generate_content(
|
34 |
model="gemini-2.0-flash-exp", # Oder "gemini-2.0-flash-exp", je nach Verfügbarkeit
|
35 |
contents=["Beschreibe dieses Bild und identifiziere das Hauptobjekt.", types.Part.from_bytes(data=image_bytes, mime_type=f"image/{image.format.lower()}")
|
|
|
29 |
|
30 |
|
31 |
# Anfrage an Gemini senden
|
32 |
+
client = genai.Client(api_key=os.getenv("KEY")) # Client innerhalb der Funktion erstellen
|
33 |
response = client.models.generate_content(
|
34 |
model="gemini-2.0-flash-exp", # Oder "gemini-2.0-flash-exp", je nach Verfügbarkeit
|
35 |
contents=["Beschreibe dieses Bild und identifiziere das Hauptobjekt.", types.Part.from_bytes(data=image_bytes, mime_type=f"image/{image.format.lower()}")
|