ShashwatStable commited on
Commit
5a07ece
·
verified ·
1 Parent(s): 6647b6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -7
app.py CHANGED
@@ -38,13 +38,19 @@ def prompt(pos,hei,wid,no):
38
  print(future)
39
 
40
  for i in id :
41
- li = requests.get(f"https://www.comfydeploy.com/api/run?run_id={i}",headers=hed)
42
- lo=li.json()
43
- if 'url' not in lo['outputs'][0]['data']:
44
- li = requests.get(f"https://www.comfydeploy.com/api/run?run_id={i}",headers=hed)
45
- lo=li.json()
46
- url=lo['outputs'][0]['data']['images'][0]['url']
47
- urls.append(url)
 
 
 
 
 
 
48
  return urls
49
 
50
 
 
38
  print(future)
39
 
40
  for i in id :
41
+ li = requests.get(f"https://www.comfydeploy.com/api/run?run_id={i}",headers=hed)
42
+ lo=li.json()
43
+ url=lo['outputs']
44
+ while 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']
48
+ while 'url' not in url:
49
+ li = requests.get(f"https://www.comfydeploy.com/api/run?run_id={i}",headers=hed)
50
+ lo=li.json()
51
+ url=lo['outputs'][0]['data']['images'][0]
52
+ url=url['url']
53
+ urls.append(url)
54
  return urls
55
 
56