hra commited on
Commit
831acb3
1 Parent(s): cf9e738

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -50,6 +50,7 @@ ENDPOINT_URL="https://api-inference.huggingface.co/models/stabilityai/stable-dif
50
  HF_TOKEN=API_TOKEN# token where you deployed your endpoint
51
 
52
  def generate_image(prompt_SD:str):
 
53
  payload = {"inputs": prompt_SD,}
54
  headers = {
55
  "Authorization": f"Bearer {HF_TOKEN}",
@@ -57,7 +58,7 @@ def generate_image(prompt_SD:str):
57
  "Accept": "image/png" # important to get an image back
58
  }
59
  response = requests.post(ENDPOINT_URL, headers=headers, json=payload)
60
- #print(response.content)
61
  img = Image.open(BytesIO(response.content))
62
 
63
  return img
 
50
  HF_TOKEN=API_TOKEN# token where you deployed your endpoint
51
 
52
  def generate_image(prompt_SD:str):
53
+ print(prompt_SD)
54
  payload = {"inputs": prompt_SD,}
55
  headers = {
56
  "Authorization": f"Bearer {HF_TOKEN}",
 
58
  "Accept": "image/png" # important to get an image back
59
  }
60
  response = requests.post(ENDPOINT_URL, headers=headers, json=payload)
61
+ print(response.content)
62
  img = Image.open(BytesIO(response.content))
63
 
64
  return img