RamAnanth1 commited on
Commit
87c9df6
1 Parent(s): d019ade

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -10,13 +10,12 @@ model, vis_processors, _ = load_model_and_preprocess(
10
  name=model_name,
11
  model_type=model_type,
12
  is_eval=True,
13
- device=device,
14
- dtype=torch.float16
15
  )
 
16
 
17
  def infer(image, prompt, min_len, max_len, beam_size, len_penalty, repetition_penalty, top_p, decoding_method):
18
  use_nucleus_sampling = decoding_method == "Nucleus sampling"
19
- print(image, prompt, min_len, max_len, beam_size, len_penalty, repetition_penalty, top_p, use_nucleus_sampling)
20
  image = vis_processors["eval"](image).unsqueeze(0).to(device)
21
 
22
  samples = {
 
10
  name=model_name,
11
  model_type=model_type,
12
  is_eval=True,
13
+ device=device
 
14
  )
15
+ model=model.float()
16
 
17
  def infer(image, prompt, min_len, max_len, beam_size, len_penalty, repetition_penalty, top_p, decoding_method):
18
  use_nucleus_sampling = decoding_method == "Nucleus sampling"
 
19
  image = vis_processors["eval"](image).unsqueeze(0).to(device)
20
 
21
  samples = {