lalashechka commited on
Commit
750ef61
1 Parent(s): 314e1cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,7 +46,7 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
46
  hf_token = os.getenv("hf_token")
47
  if task == "Playground v2":
48
  playground = str(os.getenv("playground"))
49
- with closing(create_connection("wss://ashrafb-arpr.hf.space/queue/join")) as conn:
50
  conn.send('{"fn_index":0,"session_hash":""}')
51
  conn.send(f'{{"fn_index":0,"data":["{prompt}"],"session_hash":""}}')
52
  conn.recv()
@@ -62,7 +62,7 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
62
 
63
  if task == "Artigen v3":
64
  artigen = str(os.getenv("artigen"))
65
- with closing(create_connection("wss://ashrafb-arv3s.hf.space/queue/join")) as conn:
66
  conn.send('{"fn_index":0,"session_hash":""}')
67
  conn.send(f'{{"fn_index":0,"data":["{prompt}", 0, "No style"],"session_hash":""}}')
68
  conn.recv()
 
46
  hf_token = os.getenv("hf_token")
47
  if task == "Playground v2":
48
  playground = str(os.getenv("playground"))
49
+ with closing(create_connection("wss://ashrafb-arpr.hf.space/queue/join", timeout=60)) as conn:
50
  conn.send('{"fn_index":0,"session_hash":""}')
51
  conn.send(f'{{"fn_index":0,"data":["{prompt}"],"session_hash":""}}')
52
  conn.recv()
 
62
 
63
  if task == "Artigen v3":
64
  artigen = str(os.getenv("artigen"))
65
+ with closing(create_connection("wss://ashrafb-arv3s.hf.space/queue/join", timeout=60)) as conn:
66
  conn.send('{"fn_index":0,"session_hash":""}')
67
  conn.send(f'{{"fn_index":0,"data":["{prompt}", 0, "No style"],"session_hash":""}}')
68
  conn.recv()