ShashwatStable commited on
Commit
41c8250
·
verified ·
1 Parent(s): 50a9c1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -41,11 +41,9 @@ def prompt(pos,hei,wid,no):
41
  for i in id :
42
  li = requests.get(f"https://www.comfydeploy.com/api/run?run_id={i}",headers=hed)
43
  lo=li.json()
44
- while lo['outputs']==[]:
45
- li = requests.get(f"https://www.comfydeploy.com/api/run?run_id={i}",headers=hed)
46
- lo=li.json()
47
- time.sleep(7)
48
- print(lo)
49
  url=lo['outputs'][0]['data']['images'][0]['url']
50
  urls.append(url)
51
  return urls
 
41
  for i in id :
42
  li = requests.get(f"https://www.comfydeploy.com/api/run?run_id={i}",headers=hed)
43
  lo=li.json()
44
+ if 'url' notin lo['outputs'][0]['data']['images'][0]['url'] :
45
+ li = requests.get(f"https://www.comfydeploy.com/api/run?run_id={i}",headers=hed)
46
+ lo=li.json()
 
 
47
  url=lo['outputs'][0]['data']['images'][0]['url']
48
  urls.append(url)
49
  return urls