AjithBharadwaj commited on
Commit
4878b34
1 Parent(s): 5109866

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,7 +4,8 @@ import io
4
  import requests
5
  import os
6
  HF_TOKEN = os.environ["HF_TOKEN"]
7
-
 
8
  def query(payload):
9
  response = requests.post(API_URL, headers=headers, json=payload)
10
  return response.content
@@ -21,8 +22,7 @@ def main():
21
  # Call image_generator function
22
 
23
 
24
- API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
25
- headers = {"Authorization": f"Bearer {HF_TOKEN}"}
26
  image_bytes = query({
27
  "inputs": text_input,
28
  })
 
4
  import requests
5
  import os
6
  HF_TOKEN = os.environ["HF_TOKEN"]
7
+ API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
8
+ headers = {"Authorization": f"Bearer {HF_TOKEN}"}
9
  def query(payload):
10
  response = requests.post(API_URL, headers=headers, json=payload)
11
  return response.content
 
22
  # Call image_generator function
23
 
24
 
25
+
 
26
  image_bytes = query({
27
  "inputs": text_input,
28
  })