Tonic commited on
Commit
9a9e036
·
1 Parent(s): 4ebf1ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -34,6 +34,9 @@ def clean_response(response: str) -> str:
34
  return response
35
 
36
  def chat_with_model(image_path=None, text_query=None, history=None):
 
 
 
37
  default_image_path = None
38
  default_text = ""
39
  image_input = image_path if image_path else default_image_path
 
34
  return response
35
 
36
  def chat_with_model(image_path=None, text_query=None, history=None):
37
+ try:
38
+ with Image.open(image_path) as img:
39
+ print(f"Image {image_path} opened successfully.")
40
  default_image_path = None
41
  default_text = ""
42
  image_input = image_path if image_path else default_image_path