osmunphotography commited on
Commit
96a5439
·
verified ·
1 Parent(s): 4e6daa4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
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
- if result != 0:
15
- print("Git clone command failed.")
 
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()