Update app.py
Browse files
app.py
CHANGED
|
@@ -150,7 +150,7 @@ def generate_video_with_fallback(
|
|
| 150 |
|
| 151 |
# ββ GEMINI ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 152 |
def call_gemini(pil_image: Image.Image, user_desc: str, language: str, style: str) -> dict:
|
| 153 |
-
client = genai.Client()
|
| 154 |
|
| 155 |
lang_map = {
|
| 156 |
"English": "Write everything in English.",
|
|
@@ -182,7 +182,7 @@ CRITICAL: Return ONLY raw JSON. No markdown. No ```json. No explanation. Pure JS
|
|
| 182 |
image_bytes = buf.getvalue()
|
| 183 |
|
| 184 |
response = client.models.generate_content(
|
| 185 |
-
model="gemini-2.5-flash",
|
| 186 |
contents=[
|
| 187 |
types.Part.from_bytes(data=image_bytes, mime_type="image/jpeg"),
|
| 188 |
types.Part.from_text(text=prompt),
|
|
|
|
| 150 |
|
| 151 |
# ββ GEMINI ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 152 |
def call_gemini(pil_image: Image.Image, user_desc: str, language: str, style: str) -> dict:
|
| 153 |
+
client = genai.Client(api_key=gemini_key)
|
| 154 |
|
| 155 |
lang_map = {
|
| 156 |
"English": "Write everything in English.",
|
|
|
|
| 182 |
image_bytes = buf.getvalue()
|
| 183 |
|
| 184 |
response = client.models.generate_content(
|
| 185 |
+
model="gemini-2.5-flash-preview-05-20",
|
| 186 |
contents=[
|
| 187 |
types.Part.from_bytes(data=image_bytes, mime_type="image/jpeg"),
|
| 188 |
types.Part.from_text(text=prompt),
|