sitammeur commited on
Commit
df22269
·
verified ·
1 Parent(s): d78a2b4

Update src/app/response.py

Browse files
Files changed (1) hide show
  1. src/app/response.py +1 -1
src/app/response.py CHANGED
@@ -50,7 +50,7 @@ def caption_image(image: PIL.Image.Image, max_new_tokens: int) -> str:
50
  logging.info("Caption generated successfully.")
51
 
52
  # Return the generated caption
53
- return result[0][len(text) :].lstrip("\n")
54
 
55
  # Handle exceptions that may occur during caption generation
56
  except Exception as e:
 
50
  logging.info("Caption generated successfully.")
51
 
52
  # Return the generated caption
53
+ return result[0][len(prompt) :].lstrip("\n")
54
 
55
  # Handle exceptions that may occur during caption generation
56
  except Exception as e: