Kawthar12h commited on
Commit
2e9a25d
1 Parent(s): 65dbd9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ def caption_and_translate(img, min_len, max_len):
32
  raw_image = Image.open(img).convert('RGB')
33
  inputs_blip = processor_blip(raw_image, return_tensors="pt")
34
 
35
- out_blip = model_blip.generate(**inputs_blip, min_length=70, max_length=1000)
36
  english_caption = processor_blip.decode(out_blip[0], skip_special_tokens=True)
37
 
38
  # Translate caption from English to Arabic
 
32
  raw_image = Image.open(img).convert('RGB')
33
  inputs_blip = processor_blip(raw_image, return_tensors="pt")
34
 
35
+ out_blip = model_blip.generate(**inputs_blip, min_length=40, max_length=500)
36
  english_caption = processor_blip.decode(out_blip[0], skip_special_tokens=True)
37
 
38
  # Translate caption from English to Arabic