Spaces:
Sleeping
Sleeping
Se agrega el token
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import torch
|
2 |
from transformers import pipeline
|
3 |
import streamlit as st
|
|
|
4 |
|
5 |
model_id = "meta-llama/Llama-3.2-1B"
|
6 |
|
@@ -8,7 +9,8 @@ pipe = pipeline(
|
|
8 |
"text-generation",
|
9 |
model=model_id,
|
10 |
torch_dtype=torch.bfloat16,
|
11 |
-
device_map="auto"
|
|
|
12 |
)
|
13 |
|
14 |
input = st.text_input("Ingrese el Promt")
|
|
|
1 |
import torch
|
2 |
from transformers import pipeline
|
3 |
import streamlit as st
|
4 |
+
import os
|
5 |
|
6 |
model_id = "meta-llama/Llama-3.2-1B"
|
7 |
|
|
|
9 |
"text-generation",
|
10 |
model=model_id,
|
11 |
torch_dtype=torch.bfloat16,
|
12 |
+
device_map="auto",
|
13 |
+
token = os.getenv('HF_TOKEN')
|
14 |
)
|
15 |
|
16 |
input = st.text_input("Ingrese el Promt")
|