Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,9 @@ from huggingface_hub import HfFolder
|
|
10 |
|
11 |
print(HfFolder.get_token())
|
12 |
login()
|
13 |
-
|
|
|
|
|
14 |
# Load GPT-2 model and tokenizer
|
15 |
|
16 |
# Set environment variable to avoid floating-point errors
|
|
|
10 |
|
11 |
print(HfFolder.get_token())
|
12 |
login()
|
13 |
+
# Load the Hugging Face token from the environment variable
|
14 |
+
token = os.getenv('HUGGINGFACE_TOKEN')
|
15 |
+
HfFolder.save_token(token)
|
16 |
# Load GPT-2 model and tokenizer
|
17 |
|
18 |
# Set environment variable to avoid floating-point errors
|