Spaces:
Runtime error
Runtime error
Update src/app/response.py
Browse files- src/app/response.py +2 -2
src/app/response.py
CHANGED
@@ -38,9 +38,9 @@ def describe_image(image: str, question: str) -> str:
|
|
38 |
str: The generated answer to the question.
|
39 |
"""
|
40 |
try:
|
41 |
-
# Check if
|
42 |
if image is None or question is None:
|
43 |
-
raise gr.Error("
|
44 |
|
45 |
# Message format for the model
|
46 |
msgs = [{"role": "user", "content": [image, question]}]
|
|
|
38 |
str: The generated answer to the question.
|
39 |
"""
|
40 |
try:
|
41 |
+
# Check if image or question is None
|
42 |
if image is None or question is None:
|
43 |
+
raise gr.Error("Please provide an image and a question.")
|
44 |
|
45 |
# Message format for the model
|
46 |
msgs = [{"role": "user", "content": [image, question]}]
|