ShashwatStable commited on
Commit
3651431
·
verified ·
1 Parent(s): d074bf0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -30,27 +30,27 @@ def prompt(pos,hei,wid,no):
30
  a=a['run_id']
31
  id.append(a)
32
 
33
- futures = []
34
- with concurrent.futures.ThreadPoolExecutor() as executor:
35
- for url in range(no):
36
- futures.append(executor.submit(gen))
37
- for future in concurrent.futures.as_completed(futures):
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
 
 
30
  a=a['run_id']
31
  id.append(a)
32
 
33
+ futures = []
34
+ with concurrent.futures.ThreadPoolExecutor() as executor:
35
+ for url in range(no):
36
+ futures.append(executor.submit(gen))
37
+ for future in concurrent.futures.as_completed(futures):
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