Spaces:
Running
Running
Commit
•
ef84d25
1
Parent(s):
6513c75
Update app.py
Browse files
app.py
CHANGED
@@ -31,8 +31,8 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
|
|
31 |
with closing(create_connection(f"wss://artgan-diffusion-api.hf.space/queue/join")) as conn:
|
32 |
conn.send('{"fn_index":0,"session_hash":""}')
|
33 |
conn.send(f'{{"fn_index":0,"data":["{prompt}","",1024,1024,4,42,1,20,10],"session_hash":""}}')
|
34 |
-
|
35 |
-
while
|
36 |
status = json.loads(conn.recv())['msg']
|
37 |
if status == 'estimation':
|
38 |
time.sleep(1)
|
|
|
31 |
with closing(create_connection(f"wss://artgan-diffusion-api.hf.space/queue/join")) as conn:
|
32 |
conn.send('{"fn_index":0,"session_hash":""}')
|
33 |
conn.send(f'{{"fn_index":0,"data":["{prompt}","",1024,1024,4,42,1,20,10],"session_hash":""}}')
|
34 |
+
c = 0
|
35 |
+
while c < 120:
|
36 |
status = json.loads(conn.recv())['msg']
|
37 |
if status == 'estimation':
|
38 |
time.sleep(1)
|