Evaaaaa06 commited on
Commit
66eec29
·
verified ·
1 Parent(s): e45c761

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -0
main.py CHANGED
@@ -95,6 +95,7 @@ def analyze_with_gemini(image_path, user_text):
95
  raise FileNotFoundError(f"圖片路徑無效:{image_path}")
96
 
97
  organ = PIL.Image.open(image_path)
 
98
  response = chat.send_message([user_text, organ])
99
 
100
  # 提取回應內容
 
95
  raise FileNotFoundError(f"圖片路徑無效:{image_path}")
96
 
97
  organ = PIL.Image.open(image_path)
98
+ chat = model.start_chat(history=history)
99
  response = chat.send_message([user_text, organ])
100
 
101
  # 提取回應內容