Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -53,15 +53,18 @@ def process():
|
|
53 |
additional_arguments = ["--disable-in-browser", "--attention-split", "--always-cpu"]
|
54 |
|
55 |
# Gabungkan semua argumen
|
56 |
-
|
|
|
57 |
command = ["python", python_script] + additional_arguments
|
58 |
|
59 |
# Jalankan skrip menggunakan subprocess
|
60 |
-
subprocess.run(PIP)
|
61 |
-
print("Installing..")
|
62 |
|
63 |
-
|
|
|
|
|
|
|
64 |
print("Running..")
|
|
|
65 |
# subprocess.run([batch_file_path], shell=True)
|
66 |
|
67 |
process()
|
|
|
53 |
additional_arguments = ["--disable-in-browser", "--attention-split", "--always-cpu"]
|
54 |
|
55 |
# Gabungkan semua argumen
|
56 |
+
PIP0 = ["pip", "install", "--upgrade" "pip"]
|
57 |
+
PIP1 = ["pip", "install", "-r", "requirements_versions.txt"]
|
58 |
command = ["python", python_script] + additional_arguments
|
59 |
|
60 |
# Jalankan skrip menggunakan subprocess
|
|
|
|
|
61 |
|
62 |
+
print("Installing..")
|
63 |
+
subprocess.run(PIP0)
|
64 |
+
subprocess.run(PIP1)
|
65 |
+
|
66 |
print("Running..")
|
67 |
+
subprocess.run(command) # Menjalankan file batch
|
68 |
# subprocess.run([batch_file_path], shell=True)
|
69 |
|
70 |
process()
|