Update app.py
Browse files
app.py
CHANGED
|
@@ -291,8 +291,21 @@ def process_files_background(task_id, files_data, resolution_style='colorful'):
|
|
| 291 |
print(f"Task {task_id}: Nombre d'éléments de contenu: {len(contents)}")
|
| 292 |
|
| 293 |
gemini_response = client.models.generate_content(
|
| 294 |
-
model="gemini-2.5-flash-preview-05-20",
|
| 295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
)
|
| 297 |
|
| 298 |
if gemini_response.candidates:
|
|
|
|
| 291 |
print(f"Task {task_id}: Nombre d'éléments de contenu: {len(contents)}")
|
| 292 |
|
| 293 |
gemini_response = client.models.generate_content(
|
| 294 |
+
model="gemini-2.5-flash-preview-05-20",
|
| 295 |
+
|
| 296 |
+
contents=contents,
|
| 297 |
+
|
| 298 |
+
config=types.GenerateContentConfig(
|
| 299 |
+
temperature=0.3,
|
| 300 |
+
|
| 301 |
+
thinking_config=types.ThinkingConfig(
|
| 302 |
+
include_thoughts=True),
|
| 303 |
+
# Ajouter l'outil d'exécution de code
|
| 304 |
+
tools=[types.Tool(
|
| 305 |
+
code_execution=types.ToolCodeExecution
|
| 306 |
+
)]
|
| 307 |
+
)
|
| 308 |
+
|
| 309 |
)
|
| 310 |
|
| 311 |
if gemini_response.candidates:
|