Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,19 +49,19 @@ def process():
|
|
49 |
python_script = "entry_with_update.py"
|
50 |
|
51 |
# Argument yang ingin Anda tambahkan
|
52 |
-
additional_arguments = ["--in-browser", "--directml", "--debug-mode", "--multi-user", "--always-cpu"]
|
53 |
-
|
54 |
|
55 |
# Gabungkan semua argumen
|
56 |
PIP = ["pip", "install", "torch_directml"]
|
57 |
command = ["python", python_script] + additional_arguments
|
58 |
|
59 |
# Jalankan skrip menggunakan subprocess
|
60 |
-
|
61 |
-
|
62 |
|
63 |
-
subprocess.run(command)# Menjalankan file batch
|
64 |
print("Running..")
|
|
|
65 |
# subprocess.run([batch_file_path], shell=True)
|
66 |
|
67 |
launch = "process"
|
|
|
49 |
python_script = "entry_with_update.py"
|
50 |
|
51 |
# Argument yang ingin Anda tambahkan
|
52 |
+
# additional_arguments = ["--in-browser", "--directml", "--debug-mode", "--multi-user", "--always-cpu"]
|
53 |
+
additional_arguments = ["--always-gpu"]
|
54 |
|
55 |
# Gabungkan semua argumen
|
56 |
PIP = ["pip", "install", "torch_directml"]
|
57 |
command = ["python", python_script] + additional_arguments
|
58 |
|
59 |
# Jalankan skrip menggunakan subprocess
|
60 |
+
# print("Installing..")
|
61 |
+
# subprocess.run(PIP)
|
62 |
|
|
|
63 |
print("Running..")
|
64 |
+
subprocess.run(command)# Menjalankan file batch
|
65 |
# subprocess.run([batch_file_path], shell=True)
|
66 |
|
67 |
launch = "process"
|