Docfile commited on
Commit
1f9be19
·
verified ·
1 Parent(s): 60f4e39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
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", # Utilisation du modèle recommandé pour PDF
295
- contents=contents
 
 
 
 
 
 
 
 
 
 
 
 
 
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: