Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import subprocess
|
|
2 |
|
3 |
# Gantilah "app.py" dengan nama berkas aplikasi Python Anda
|
4 |
pip_script = "install -r requirements.txt"
|
|
|
5 |
python_script = "entry_with_update.py"
|
6 |
|
7 |
# Argument yang ingin Anda tambahkan
|
@@ -13,4 +14,5 @@ command = ["python", python_script] + additional_arguments
|
|
13 |
|
14 |
# Jalankan skrip menggunakan subprocess
|
15 |
subprocess.run(PIP)
|
16 |
-
subprocess.run(command)
|
|
|
|
2 |
|
3 |
# Gantilah "app.py" dengan nama berkas aplikasi Python Anda
|
4 |
pip_script = "install -r requirements.txt"
|
5 |
+
batch_file_path = ".run.bat"
|
6 |
python_script = "entry_with_update.py"
|
7 |
|
8 |
# Argument yang ingin Anda tambahkan
|
|
|
14 |
|
15 |
# Jalankan skrip menggunakan subprocess
|
16 |
subprocess.run(PIP)
|
17 |
+
# subprocess.run(command)# Menjalankan file batch
|
18 |
+
subprocess.run([batch_file_path], shell=True)
|