alanchen1115 commited on
Commit
246e678
·
verified ·
1 Parent(s): 3119b44

Update Uploading_images_file.py

Browse files
Files changed (1) hide show
  1. Uploading_images_file.py +2 -2
Uploading_images_file.py CHANGED
@@ -40,8 +40,8 @@ def analyze_with_gemini(image_path, user_text):
40
  if not os.path.exists(image_path):
41
  raise FileNotFoundError(f"圖片路徑無效:{image_path}")
42
 
43
- organ = PIL.Image.open(image_path)
44
- response = chat.send_message([user_text, organ])
45
 
46
  # 提取回應內容
47
  return response.text
 
40
  if not os.path.exists(image_path):
41
  raise FileNotFoundError(f"圖片路徑無效:{image_path}")
42
 
43
+ img_user = PIL.Image.open(image_path)
44
+ response = chat.send_message([user_text, img_user)])
45
 
46
  # 提取回應內容
47
  return response.text