sk007msd commited on
Commit
409e937
·
verified ·
1 Parent(s): 62a55fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -41,7 +41,7 @@ def query_image(prompt):
41
  payload={"inputs":prompt}
42
  for attempt in range(max_retries):
43
  response=requests.post(image_API,headers=headers,json=payload)
44
- if response.status_code==200 and response.get.headers('Content-Type','').startswith('image/'):
45
  image_path='generated_image.png'
46
  with open(image_path,'wb') as f:
47
  f.write(response.content)
 
41
  payload={"inputs":prompt}
42
  for attempt in range(max_retries):
43
  response=requests.post(image_API,headers=headers,json=payload)
44
+ if response.status_code == 200 and response.headers.get('Content-Type', '').startswith('image/'):
45
  image_path='generated_image.png'
46
  with open(image_path,'wb') as f:
47
  f.write(response.content)