Spaces:
Runtime error
Runtime error
Commit
·
aaee99f
1
Parent(s):
ba8e368
Upload app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,23 @@
|
|
1 |
-
import os
|
2 |
-
from dotenv import load_dotenv
|
3 |
-
from subprocess import Popen
|
4 |
-
commandline_args = os.environ.get('COMMANDLINE_ARGS', "--skip-torch-cuda-test")
|
5 |
-
load_dotenv()
|
6 |
-
|
7 |
-
command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"]
|
8 |
-
worker = Popen(command)
|
9 |
-
worker.wait()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# import os
|
2 |
+
# from dotenv import load_dotenv
|
3 |
+
# from subprocess import Popen
|
4 |
+
# commandline_args = os.environ.get('COMMANDLINE_ARGS', "--skip-torch-cuda-test")
|
5 |
+
# load_dotenv()
|
6 |
+
|
7 |
+
# command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"]
|
8 |
+
# worker = Popen(command)
|
9 |
+
# worker.wait()
|
10 |
+
|
11 |
+
#@title Run with Gradio
|
12 |
+
#@markdown 
|
13 |
+
|
14 |
+
import subprocess
|
15 |
+
# cek = subprocess.getoutput('nvidia-smi')
|
16 |
+
# if not 'T4' in cek:
|
17 |
+
# print("[1;32m-----Your colab session is over. Use other google account or wait 12-24 hours-----")
|
18 |
+
# print("-----Sesi colab elu udah habis bro. Saran gw tunggu 12-24 jam atau bikin/pake akun google lain-----")
|
19 |
+
# raise KeyboardInterrupt
|
20 |
+
|
21 |
+
|
22 |
+
%cd /content/stable-diffusion-webui/
|
23 |
+
!python launch.py --share --xformers --enable-insecure-extension-access --gradio-queue --no-half-vae
|