MaziyarPanahi commited on
Commit
3890132
β€’
1 Parent(s): 25b9e12

Update app.py (#6)

Browse files

- Update app.py (cf6169b08aba710fe3dd3e5a9b9b0a13d174e4b3)

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
  import spaces
3
- from transformers import AutoModelForCausalLM, AutoProcessor
4
  import torch
5
  from PIL import Image
6
  import subprocess
@@ -11,7 +11,7 @@ import subprocess
11
 
12
  # }
13
  models = {
14
- "Qwen/Qwen2-VL-2B-Instruct": AutoModelForCausalLM.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", trust_remote_code=True, torch_dtype="auto").cuda().eval()
15
 
16
  }
17
 
 
1
  import gradio as gr
2
  import spaces
3
+ from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
4
  import torch
5
  from PIL import Image
6
  import subprocess
 
11
 
12
  # }
13
  models = {
14
+ "Qwen/Qwen2-VL-2B-Instruct": Qwen2VLForConditionalGeneration.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", trust_remote_code=True, torch_dtype="auto").cuda().eval()
15
 
16
  }
17