prithivMLmods commited on
Commit
2c8da8a
·
verified ·
1 Parent(s): 9a23baa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from transformers import AutoProcessor, AutoModelForVision2Seq, TextIteratorStreamer
3
  from threading import Thread
4
  import re
5
  import time
@@ -8,9 +8,9 @@ import torch
8
  import spaces
9
 
10
  # Load processor and model
11
- processor = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM-Instruct")
12
- model = AutoModelForVision2Seq.from_pretrained(
13
- "HuggingFaceTB/SmolVLM-Instruct",
14
  torch_dtype=torch.bfloat16,
15
  ).to("cuda")
16
 
 
1
  import gradio as gr
2
+ from transformers import AutoProcessor, AutoModelForVision2Seq, AutoModelForImageTextToText, TextIteratorStreamer
3
  from threading import Thread
4
  import re
5
  import time
 
8
  import spaces
9
 
10
  # Load processor and model
11
+ processor = AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM2-2.2B-Instruct")
12
+ model = AutoModelForImageTextToText.from_pretrained(
13
+ "HuggingFaceTB/SmolVLM2-2.2B-Instruct",
14
  torch_dtype=torch.bfloat16,
15
  ).to("cuda")
16