Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -92,35 +92,29 @@ with gr.Blocks(title="Room Design Diffusion", theme=gr.themes.Soft()) as demo:
|
|
92 |
output_image = gr.Image(label="Generated Design")
|
93 |
output_text = gr.Textbox(label="Processing Details", lines=5)
|
94 |
|
95 |
-
# Add examples
|
96 |
-
examples = [
|
97 |
-
[
|
98 |
-
"examples/free-photo-of-empty-living-room-with-with-walls.jpeg",
|
99 |
-
"A living room featuring a comfortable sofa with neutral cushions, a classic wooden coffee table, a functional TV stand with storage, and a cozy area rug that ties the space together."
|
100 |
-
],
|
101 |
-
[
|
102 |
-
"examples/2.webp",
|
103 |
-
"A living room featuring a rugged leather sofa, a rustic wood and metal coffee table, a sturdy industrial-style media stand, and a vintage-inspired rug adding warmth to the space."
|
104 |
-
],
|
105 |
-
[
|
106 |
-
"examples/3.webp",
|
107 |
-
"A modern minimalist living room with a sleek sectional sofa, contemporary glass coffee table, floating media console, and geometric pattern area rug."
|
108 |
-
]
|
109 |
-
]
|
110 |
-
|
111 |
-
gr.Examples(
|
112 |
-
examples=examples,
|
113 |
-
inputs=[input_image, prompt],
|
114 |
-
outputs=[output_image, output_text],
|
115 |
-
fn=process_image,
|
116 |
-
cache_examples=True,
|
117 |
-
)
|
118 |
-
|
119 |
submit_btn.click(
|
120 |
fn=process_image,
|
121 |
inputs=[input_image, prompt],
|
122 |
outputs=[output_image, output_text]
|
123 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
gr.Markdown("""
|
126 |
### Tips for best results:
|
|
|
92 |
output_image = gr.Image(label="Generated Design")
|
93 |
output_text = gr.Textbox(label="Processing Details", lines=5)
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
submit_btn.click(
|
96 |
fn=process_image,
|
97 |
inputs=[input_image, prompt],
|
98 |
outputs=[output_image, output_text]
|
99 |
)
|
100 |
+
|
101 |
+
gr.Examples(
|
102 |
+
examples=[
|
103 |
+
[
|
104 |
+
os.path.join(os.path.dirname(__file__), "examples/free-photo-of-empty-living-room-with-with-walls.jpeg"),
|
105 |
+
"A living room featuring a comfortable sofa with neutral cushions, a classic wooden coffee table, a functional TV stand with storage, and a cozy area rug that ties the space together."
|
106 |
+
],
|
107 |
+
[
|
108 |
+
os.path.join(os.path.dirname(__file__), "examples/2.webp"),
|
109 |
+
"A living room featuring a rugged leather sofa, a rustic wood and metal coffee table, a sturdy industrial-style media stand, and a vintage-inspired rug adding warmth to the space."
|
110 |
+
],
|
111 |
+
[
|
112 |
+
os.path.join(os.path.dirname(__file__), "examples/3.webp"),
|
113 |
+
"A modern minimalist living room with a sleek sectional sofa, contemporary glass coffee table, floating media console, and geometric pattern area rug."
|
114 |
+
]
|
115 |
+
],
|
116 |
+
inputs=[input_image, prompt],
|
117 |
+
)
|
118 |
|
119 |
gr.Markdown("""
|
120 |
### Tips for best results:
|