Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
-
iface.launch()
|
| 8 |
-
git clone https://content!git clone https://github.com/lllyasviel/Fooocus.git%
|
| 9 |
-
import os
|
| 10 |
-
|
| 11 |
-
# Run the git clone command
|
| 12 |
-
result = os.system("git clone https://github.com/lllyasviel/Fooocus")
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import subprocess
|
| 3 |
+
|
| 4 |
+
# Correct way to clone using subprocess.run
|
| 5 |
+
try:
|
| 6 |
+
subprocess.run(["git", "clone", "https://github.com/lllyasviel/Fooocus.git"], check=True)
|
| 7 |
+
except subprocess.CalledProcessError as e:
|
| 8 |
+
print(f"Git clone command failed: {e}")
|
| 9 |
|
| 10 |
def greet(name):
|
| 11 |
return "Hello " + name + "!!"
|
| 12 |
|
| 13 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
# Launch the Gradio interface
|
| 16 |
+
iface.launch()
|