Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ from datasets import load_dataset
|
|
| 15 |
import gradio as gr
|
| 16 |
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
# Model configuration and pipeline setup
|
| 21 |
model_id = 'google/gemma-1.1-2b-it'
|
|
@@ -37,10 +37,10 @@ model = transformers.AutoModelForCausalLM.from_pretrained(
|
|
| 37 |
trust_remote_code=True,
|
| 38 |
config=transformers.AutoConfig.from_pretrained(model_id),
|
| 39 |
device_map='auto',
|
| 40 |
-
use_auth_token=
|
| 41 |
)
|
| 42 |
|
| 43 |
-
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id, use_auth_token=
|
| 44 |
|
| 45 |
# Set up the query generation pipeline
|
| 46 |
query_pipeline = pipeline(
|
|
|
|
| 15 |
import gradio as gr
|
| 16 |
|
| 17 |
|
| 18 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 19 |
|
| 20 |
# Model configuration and pipeline setup
|
| 21 |
model_id = 'google/gemma-1.1-2b-it'
|
|
|
|
| 37 |
trust_remote_code=True,
|
| 38 |
config=transformers.AutoConfig.from_pretrained(model_id),
|
| 39 |
device_map='auto',
|
| 40 |
+
use_auth_token=hf_token
|
| 41 |
)
|
| 42 |
|
| 43 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id, use_auth_token=hf_token)
|
| 44 |
|
| 45 |
# Set up the query generation pipeline
|
| 46 |
query_pipeline = pipeline(
|