smjain commited on
Commit
d10b230
1 Parent(s): 194d3a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,9 +1,13 @@
1
  import os
 
 
2
 
3
 
4
  # Example command to set an environment variable (this is not effective for parent Python processes)
5
  token=os.environ['token']
6
- os.environ['HUGGINGFACE_TOKEN'] = token
 
 
7
 
8
  # This will not make HUGGINGFACE_TOKEN accessible in the Python script outside the os.system call.
9
 
 
1
  import os
2
+ from huggingface_hub import login
3
+
4
 
5
 
6
  # Example command to set an environment variable (this is not effective for parent Python processes)
7
  token=os.environ['token']
8
+ access_token_read = token
9
+ login(token = access_token_read)
10
+ #os.environ['HUGGINGFACE_TOKEN'] = token
11
 
12
  # This will not make HUGGINGFACE_TOKEN accessible in the Python script outside the os.system call.
13