Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -167,10 +167,6 @@ def gemini_client():
|
|
| 167 |
|
| 168 |
def gemini_generate(prompt: str, temperature: float = 0.2) -> str:
|
| 169 |
client = gemini_client()
|
| 170 |
-
|
| 171 |
-
# Kies een veilige default die bijna altijd beschikbaar is:
|
| 172 |
-
# "gemini-1.5-pro" kan, maar als je account/regio iets anders is,
|
| 173 |
-
# werkt "gemini-1.5-flash" vrijwel altijd.
|
| 174 |
model = os.getenv("GEMINI_MODEL", "gemini-1.5-flash")
|
| 175 |
|
| 176 |
resp = client.models.generate_content(
|
|
@@ -181,7 +177,6 @@ def gemini_generate(prompt: str, temperature: float = 0.2) -> str:
|
|
| 181 |
"max_output_tokens": 4096,
|
| 182 |
},
|
| 183 |
)
|
| 184 |
-
# resp.text bestaat in de nieuwe SDK
|
| 185 |
return (resp.text or "").strip()
|
| 186 |
|
| 187 |
|
|
|
|
| 167 |
|
| 168 |
def gemini_generate(prompt: str, temperature: float = 0.2) -> str:
|
| 169 |
client = gemini_client()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
model = os.getenv("GEMINI_MODEL", "gemini-1.5-flash")
|
| 171 |
|
| 172 |
resp = client.models.generate_content(
|
|
|
|
| 177 |
"max_output_tokens": 4096,
|
| 178 |
},
|
| 179 |
)
|
|
|
|
| 180 |
return (resp.text or "").strip()
|
| 181 |
|
| 182 |
|