pakdeveloper commited on
Commit
adc6087
·
verified ·
1 Parent(s): 8eac53f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -17
app.py CHANGED
@@ -1,23 +1,10 @@
1
  import os
2
- import gradio as gr
3
 
4
- # Change directory to the uploaded Fooocus folder
5
- os.chdir("Fooocus-main") # Use "Fooocus" if you renamed the folder
6
 
7
  # Install dependencies
8
  os.system("pip install pygit2==1.15.1")
9
 
10
- # Import Fooocus
11
- from Fooocus_main.entry_with_update import run_fooocus
12
-
13
- # Create a Gradio interface
14
- iface = gr.Interface(
15
- fn=run_fooocus, # Function to call
16
- inputs="text", # Input is a text prompt
17
- outputs="image", # Output is an image
18
- title="Fooocus on Hugging Face Spaces",
19
- description="Generate images using Fooocus."
20
- )
21
-
22
- # Launch the Gradio app
23
- iface.launch()
 
1
  import os
 
2
 
3
+ # Change directory to Fooocus
4
+ os.chdir("Fooocus")
5
 
6
  # Install dependencies
7
  os.system("pip install pygit2==1.15.1")
8
 
9
+ # Run Fooocus
10
+ os.system("python entry_with_update.py --always-cpu")