sitammeur commited on
Commit
4118429
·
verified ·
1 Parent(s): d49d27b

Update src/app/response.py

Browse files
Files changed (1) hide show
  1. 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 video or question is None
42
  if image is None or question is None:
43
- raise gr.Error("Image or question cannot be None.")
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]}]