techasad commited on
Commit
b8dbbd0
1 Parent(s): 2d00cca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,9 +3,10 @@ import requests
3
  from PIL import Image
4
  import io
5
  import PIL
 
6
 
7
  API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl"
8
- headers = {"Authorization": "Bearer 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"}
9
 
10
  def generate_image(prompt):
11
  response = requests.post(API_URL, headers=headers, json={"inputs": prompt})
 
3
  from PIL import Image
4
  import io
5
  import PIL
6
+ import os
7
 
8
  API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl"
9
+ headers = os.getenv("SEECRET_TOKEN")
10
 
11
  def generate_image(prompt):
12
  response = requests.post(API_URL, headers=headers, json={"inputs": prompt})