Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,12 +28,16 @@ def clone_and_run_fooocus():
|
|
28 |
subprocess.run(["git", "clone", "https://github.com/lllyasviel/Fooocus.git"], check=True)
|
29 |
print("Fooocus repository cloned successfully.")
|
30 |
print("Changing directory to Fooocus...")
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
print("Executing entry_with_update.py...")
|
33 |
subprocess.run(["python", "entry_with_update.py", "--share", "--always-high-vram"], check=True)
|
34 |
print("Fooocus script execution complete.")
|
35 |
except subprocess.CalledProcessError as e:
|
36 |
-
print(
|
37 |
print("Please ensure you have Git and Python installed correctly.")
|
38 |
|
39 |
if __name__ == "__main__":
|
|
|
28 |
subprocess.run(["git", "clone", "https://github.com/lllyasviel/Fooocus.git"], check=True)
|
29 |
print("Fooocus repository cloned successfully.")
|
30 |
print("Changing directory to Fooocus...")
|
31 |
+
|
32 |
+
# Use os.chdir() to change directories within Python
|
33 |
+
import os
|
34 |
+
os.chdir("Fooocus")
|
35 |
+
|
36 |
print("Executing entry_with_update.py...")
|
37 |
subprocess.run(["python", "entry_with_update.py", "--share", "--always-high-vram"], check=True)
|
38 |
print("Fooocus script execution complete.")
|
39 |
except subprocess.CalledProcessError as e:
|
40 |
+
print("An error occurred: {e}")
|
41 |
print("Please ensure you have Git and Python installed correctly.")
|
42 |
|
43 |
if __name__ == "__main__":
|