sandz7 commited on
Commit
0a35e8d
Β·
1 Parent(s): 7dfd14d

added the hf token on top of script

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -6,8 +6,9 @@ import os
6
  from threading import Thread
7
  from openai import OpenAI
8
 
9
- # Space id
10
- space_id = "sandz7"
 
11
 
12
  # Authenticate with hf api
13
  api = HfApi()
@@ -49,10 +50,6 @@ def space_hardware_config(instance_size: str="gpu",
49
  # Automatically place to the standard config we need for loki
50
  space_hardware_config()
51
 
52
- TOKEN = os.getenv('HF_AUTH_TOKEN')
53
- login(token=TOKEN,
54
- add_to_git_credential=False)
55
-
56
  # Open ai api key
57
  API_KEY = os.getenv('OPEN_AI_API_KEY')
58
 
 
6
  from threading import Thread
7
  from openai import OpenAI
8
 
9
+ TOKEN = os.getenv('HF_AUTH_TOKEN')
10
+ login(token=TOKEN,
11
+ add_to_git_credential=False)
12
 
13
  # Authenticate with hf api
14
  api = HfApi()
 
50
  # Automatically place to the standard config we need for loki
51
  space_hardware_config()
52
 
 
 
 
 
53
  # Open ai api key
54
  API_KEY = os.getenv('OPEN_AI_API_KEY')
55