Spaces:
Runtime error
Runtime error
Added Requirements and Gitignore
Browse files- .gitignore +1 -0
- app.py +10 -5
- requirements.txt +14 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
__pycache__
|
app.py
CHANGED
@@ -35,10 +35,15 @@ def generate_with_mask_(image_path: str, cloth_path: str = None, prompt: str = N
|
|
35 |
|
36 |
|
37 |
with gr.Blocks() as demo:
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
demo.launch()
|
|
|
35 |
|
36 |
|
37 |
with gr.Blocks() as demo:
|
38 |
+
with gr.Row():
|
39 |
+
image = gr.inputs.Image(label = "Input Image")
|
40 |
+
with gr.Row():
|
41 |
+
cloth = gr.inputs.Image(label = "Cloth Image")
|
42 |
+
with gr.Row():
|
43 |
+
prompt = gr.inputs.Textbox(lines=5, label="Editing Prompt")
|
44 |
+
with gr.Column():
|
45 |
+
output = gr.outputs.Image(label="Generated Image")
|
46 |
+
run = gr.Button(label="Generate Preview")
|
47 |
+
run.click(generate_with_mask_, inputs=[image, cloth, prompt], outputs=output)
|
48 |
|
49 |
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch --index-url https://download.pytorch.org/whl/cpu
|
2 |
+
torchvision
|
3 |
+
transformers
|
4 |
+
diffusers
|
5 |
+
accelerate
|
6 |
+
Pillow
|
7 |
+
matplotlib
|
8 |
+
fastapi
|
9 |
+
uvicorn
|
10 |
+
beautifulsoup4
|
11 |
+
lxml
|
12 |
+
html5lib
|
13 |
+
numpy
|
14 |
+
selenium==4.9.0
|