Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,10 +7,13 @@ import torch
|
|
7 |
from transformers import MllamaForConditionalGeneration, AutoProcessor
|
8 |
from OmniGen import OmniGenPipeline
|
9 |
|
|
|
10 |
Llama32V_HFtoken = os.getenv("Llama32V")
|
|
|
|
|
11 |
pipe = OmniGenPipeline.from_pretrained("Shitao/OmniGen-v1")
|
12 |
model_id = "meta-llama/Llama-3.2-11B-Vision-Instruct"
|
13 |
-
model = MllamaForConditionalGeneration.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto"
|
14 |
processor = AutoProcessor.from_pretrained(model_id)
|
15 |
|
16 |
@spaces.GPU()
|
|
|
7 |
from transformers import MllamaForConditionalGeneration, AutoProcessor
|
8 |
from OmniGen import OmniGenPipeline
|
9 |
|
10 |
+
from huggingface_hub import login
|
11 |
Llama32V_HFtoken = os.getenv("Llama32V")
|
12 |
+
login(Llama32V_HFtoken)
|
13 |
+
|
14 |
pipe = OmniGenPipeline.from_pretrained("Shitao/OmniGen-v1")
|
15 |
model_id = "meta-llama/Llama-3.2-11B-Vision-Instruct"
|
16 |
+
model = MllamaForConditionalGeneration.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
|
17 |
processor = AutoProcessor.from_pretrained(model_id)
|
18 |
|
19 |
@spaces.GPU()
|