Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,10 @@ hf_token = os.getenv("DOWNLOAD")
|
|
12 |
# !pip install sentencepiece # Uncomment if needed
|
13 |
|
14 |
# Load tokenizer and model with proper token
|
15 |
-
tokenizer
|
16 |
-
|
|
|
|
|
17 |
|
18 |
# Define your neural networks
|
19 |
class LargeNeuralNetwork(nn.Module):
|
|
|
12 |
# !pip install sentencepiece # Uncomment if needed
|
13 |
|
14 |
# Load tokenizer and model with proper token
|
15 |
+
# Correct code to load the model and tokenizer with proper authentication and remote code trust
|
16 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token=hf_token)
|
17 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, use_auth_token=hf_token, trust_remote_code=True)
|
18 |
+
|
19 |
|
20 |
# Define your neural networks
|
21 |
class LargeNeuralNetwork(nn.Module):
|