kanoyo commited on
Commit
c5b29a5
·
1 Parent(s): 468f3ba

Update GUI.py

Browse files
Files changed (1) hide show
  1. GUI.py +12 -11
GUI.py CHANGED
@@ -2193,6 +2193,17 @@ with gr.Blocks(theme=gr.themes.Base()) as app:
2193
  file.flush()
2194
  print("Saved Preset %s into inference-presets.json!" % preset_name)
2195
 
 
 
 
 
 
 
 
 
 
 
 
2196
  !npm install -g localtunnel
2197
  import subprocess
2198
  import threading
@@ -2213,14 +2224,4 @@ def iframe_thread(port):
2213
  p = subprocess.Popen(["lt", "--port", "{}".format(port)], stdout=subprocess.PIPE)
2214
  for line in p.stdout:
2215
  print(line.decode(), end='')
2216
- threading.Thread(target=iframe_thread, daemon=True, args=(7860,)).start()
2217
-
2218
- if config.iscolab or config.paperspace: # Share gradio link for colab and paperspace (FORK FEATURE)
2219
- app.queue(concurrency_count=511, max_size=1022).launch(share=True, quiet=True)
2220
- else:
2221
- app.queue(concurrency_count=511, max_size=1022).launch(
2222
- server_name="0.0.0.0",
2223
- inbrowser=not config.noautoopen,
2224
- server_port=config.listen_port,
2225
- quiet=True,
2226
- )
 
2193
  file.flush()
2194
  print("Saved Preset %s into inference-presets.json!" % preset_name)
2195
 
2196
+
2197
+ if config.iscolab or config.paperspace: # Share gradio link for colab and paperspace (FORK FEATURE)
2198
+ app.queue(concurrency_count=511, max_size=1022).launch(share=True, quiet=True)
2199
+ else:
2200
+ app.queue(concurrency_count=511, max_size=1022).launch(
2201
+ server_name="0.0.0.0",
2202
+ inbrowser=not config.noautoopen,
2203
+ server_port=config.listen_port,
2204
+ quiet=True,
2205
+ )
2206
+
2207
  !npm install -g localtunnel
2208
  import subprocess
2209
  import threading
 
2224
  p = subprocess.Popen(["lt", "--port", "{}".format(port)], stdout=subprocess.PIPE)
2225
  for line in p.stdout:
2226
  print(line.decode(), end='')
2227
+ threading.Thread(target=iframe_thread, daemon=True, args=(7860,)).start()