breadlicker45 commited on
Commit
0ce1028
·
verified ·
1 Parent(s): 170d505

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -55,7 +55,7 @@ def process_image_and_text(image_pil, num_beams, temperature, seed):
55
  torch.manual_seed(seed) # Set random seed for reproducibility
56
 
57
  with torch.inference_mode():
58
- generation = model.generate(**model_inputs, max_new_tokens=300, do_sample=True, num_beams=num_beams, temperature=temperature)
59
  generation = generation[0][input_len:]
60
  decoded = processor.decode(generation, skip_special_tokens=True)
61
 
 
55
  torch.manual_seed(seed) # Set random seed for reproducibility
56
 
57
  with torch.inference_mode():
58
+ generation = model.generate(**model_inputs, max_new_tokens=200, do_sample=False, num_beams=num_beams, temperature=temperature)
59
  generation = generation[0][input_len:]
60
  decoded = processor.decode(generation, skip_special_tokens=True)
61