Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|