Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,15 @@
|
|
1 |
import requests
|
2 |
import torch
|
3 |
from PIL import Image
|
4 |
-
from transformers import
|
5 |
|
6 |
-
|
7 |
-
model_id = "meta-llama/Llama-3.2-11B-Vision-Instruct"
|
8 |
|
9 |
-
# Load
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
)
|
15 |
|
16 |
# Load the processor
|
17 |
processor = AutoProcessor.from_pretrained(model_id)
|
|
|
1 |
import requests
|
2 |
import torch
|
3 |
from PIL import Image
|
4 |
+
from transformers import pipeline
|
5 |
|
6 |
+
pipe = pipeline("text-generation", model="meta-llama/Llama-3.2-1B")
|
|
|
7 |
|
8 |
+
# Load model directly
|
9 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
10 |
+
|
11 |
+
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B")
|
12 |
+
model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-1B")
|
|
|
13 |
|
14 |
# Load the processor
|
15 |
processor = AutoProcessor.from_pretrained(model_id)
|