Evaaaaa06 commited on
Commit
48060a9
·
verified ·
1 Parent(s): c1a9cde

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -99,7 +99,7 @@ def analyze_with_gemini(image_path, user_text):
99
  raise FileNotFoundError(f"圖片路徑無效:{image_path}")
100
 
101
  # 打開本地圖片文件並將其轉換為 Base64 編碼
102
- with open(image_path, "rb") as image_file:
103
  image_binary = image_file.read()
104
 
105
  # 將二進制數據編碼為 Base64
 
99
  raise FileNotFoundError(f"圖片路徑無效:{image_path}")
100
 
101
  # 打開本地圖片文件並將其轉換為 Base64 編碼
102
+ with open(image_path, "rb") as image_file:
103
  image_binary = image_file.read()
104
 
105
  # 將二進制數據編碼為 Base64