Docfile commited on
Commit
c8299f7
·
verified ·
1 Parent(s): 6bbda80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -34,9 +34,7 @@ def ensure_latex_packages():
34
  def generate_latex_response(image_path, question):
35
  """Génère une réponse en format LaTeX depuis le modèle Gemini."""
36
  try:
37
- with open(image_path, 'rb') as img_file:
38
- image_data = img_file.read()
39
-
40
  response = client.models.generate_content(
41
  model="gemini-2.0-flash-thinking-exp",
42
  contents=[image_data, question]
 
34
  def generate_latex_response(image_path, question):
35
  """Génère une réponse en format LaTeX depuis le modèle Gemini."""
36
  try:
37
+ image_data = Image.open(image_path)
 
 
38
  response = client.models.generate_content(
39
  model="gemini-2.0-flash-thinking-exp",
40
  contents=[image_data, question]