Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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/
|
12 |
-
model =
|
13 |
-
"HuggingFaceTB/
|
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 |
|