Sravanth commited on
Commit
9f4d4f0
·
1 Parent(s): 74cf048

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -20,7 +20,7 @@ def predict(image,max_length=64, num_beams=4):
20
  clean_text = lambda x: x.replace('<|endoftext|>','').split('\n')[0]
21
  caption_ids = model.generate(image, max_length = max_length)[0]
22
  caption_text = clean_text(tokenizer.decode(caption_ids))
23
- caption_text2 = generate_caption(image)
24
  return caption_text, caption_text2
25
 
26
  blip_processor_large = AutoProcessor.from_pretrained("Salesforce/blip-image-captioning-large")
 
20
  clean_text = lambda x: x.replace('<|endoftext|>','').split('\n')[0]
21
  caption_ids = model.generate(image, max_length = max_length)[0]
22
  caption_text = clean_text(tokenizer.decode(caption_ids))
23
+ caption_text2 = generate_captions(image)
24
  return caption_text, caption_text2
25
 
26
  blip_processor_large = AutoProcessor.from_pretrained("Salesforce/blip-image-captioning-large")