gskdsrikrishna commited on
Commit
4c3b404
·
verified ·
1 Parent(s): d1e20a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ def generate_caption(image):
12
 
13
  # Preprocess the image and generate a detailed caption
14
  inputs = processor(images=image, return_tensors="pt")
15
- out = model.generate(**inputs, num_beams=5, max_length=1000, early_stopping=True)
16
  caption = processor.decode(out[0], skip_special_tokens=True)
17
 
18
  end_time = time.time() # End time
 
12
 
13
  # Preprocess the image and generate a detailed caption
14
  inputs = processor(images=image, return_tensors="pt")
15
+ out = model.generate(**inputs, num_beams=5, max_length=500, early_stopping=True)
16
  caption = processor.decode(out[0], skip_special_tokens=True)
17
 
18
  end_time = time.time() # End time