Prasi21 commited on
Commit
359e714
·
verified ·
1 Parent(s): 183c773

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ def predict(image):
30
  inputs = processor(images=image, return_tensors="pt").to(device, torch.float16)
31
  new_eos_token_id = 13
32
  with torch.no_grad():
33
- generated_ids = modelA.generate(**inputs, max_length=100,
34
  eos_token_id=new_eos_token_id)
35
  generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)
36
  return f"{generated_caption[0]}"
 
30
  inputs = processor(images=image, return_tensors="pt").to(device, torch.float16)
31
  new_eos_token_id = 13
32
  with torch.no_grad():
33
+ generated_ids = model.generate(**inputs, max_length=100,
34
  eos_token_id=new_eos_token_id)
35
  generated_caption = processor.batch_decode(generated_ids, skip_special_tokens=True)
36
  return f"{generated_caption[0]}"