Aabbhishekk commited on
Commit
02a17c2
·
1 Parent(s): d108f45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,9 +13,9 @@ token = os.environ['HF_TOKEN']
13
  # token = os.environ.get("HF_TOKEN", "")
14
  # print(token)
15
  API_URL = "https://api-inference.huggingface.co/models/playgroundai/playground-v2-1024px-aesthetic"
16
-
17
  # token =
18
- headers = {"Authorization": "Bearer {token}"}
19
 
20
  def query(payload):
21
  response = requests.post(API_URL, headers=headers, json=payload)
 
13
  # token = os.environ.get("HF_TOKEN", "")
14
  # print(token)
15
  API_URL = "https://api-inference.huggingface.co/models/playgroundai/playground-v2-1024px-aesthetic"
16
+ bearer_token = "Bearer " + str(token)
17
  # token =
18
+ headers = {"Authorization": bearer_token}
19
 
20
  def query(payload):
21
  response = requests.post(API_URL, headers=headers, json=payload)