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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,6 @@ model, vis_processors, _ = load_model_and_preprocess(
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"
@@ -32,6 +31,7 @@ def infer(image, prompt, min_len, max_len, beam_size, len_penalty, repetition_pe
32
  min_length=min_len,
33
  top_p=top_p,
34
  use_nucleus_sampling=use_nucleus_sampling,
 
35
  )
36
 
37
  return output[0]
 
12
  is_eval=True,
13
  device=device
14
  )
 
15
 
16
  def infer(image, prompt, min_len, max_len, beam_size, len_penalty, repetition_penalty, top_p, decoding_method):
17
  use_nucleus_sampling = decoding_method == "Nucleus sampling"
 
31
  min_length=min_len,
32
  top_p=top_p,
33
  use_nucleus_sampling=use_nucleus_sampling,
34
+ dtype=torch.float16
35
  )
36
 
37
  return output[0]