Spaces:
Sleeping
Sleeping
Update
Browse files- app.py +13 -0
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import io
|
|
| 3 |
import os
|
| 4 |
import zipfile
|
| 5 |
from io import BytesIO
|
|
|
|
| 6 |
from typing import Literal, cast
|
| 7 |
|
| 8 |
import gradio as gr
|
|
@@ -170,6 +171,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 170 |
brush=gr.Brush(default_size=75, colors=["#000000"], color_mode="fixed"),
|
| 171 |
transforms=[],
|
| 172 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
with gr.Column(elem_id="col-mid"):
|
| 174 |
gr.HTML(
|
| 175 |
r"""
|
|
@@ -187,6 +194,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 187 |
sources=["upload"],
|
| 188 |
image_mode="RGB",
|
| 189 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
with gr.Column(elem_id="col-right"):
|
| 191 |
gr.HTML(
|
| 192 |
r"""
|
|
|
|
| 3 |
import os
|
| 4 |
import zipfile
|
| 5 |
from io import BytesIO
|
| 6 |
+
from pathlib import Path
|
| 7 |
from typing import Literal, cast
|
| 8 |
|
| 9 |
import gradio as gr
|
|
|
|
| 171 |
brush=gr.Brush(default_size=75, colors=["#000000"], color_mode="fixed"),
|
| 172 |
transforms=[],
|
| 173 |
)
|
| 174 |
+
image_and_mask_examples = gr.Examples(
|
| 175 |
+
examples=list(Path("./examples/scenes").glob("*.png")),
|
| 176 |
+
label="Room examples",
|
| 177 |
+
examples_per_page=6,
|
| 178 |
+
inputs=[image_and_mask],
|
| 179 |
+
)
|
| 180 |
with gr.Column(elem_id="col-mid"):
|
| 181 |
gr.HTML(
|
| 182 |
r"""
|
|
|
|
| 194 |
sources=["upload"],
|
| 195 |
image_mode="RGB",
|
| 196 |
)
|
| 197 |
+
furniture_examples = gr.Examples(
|
| 198 |
+
examples=list(Path("./examples/objects").glob("*.png")),
|
| 199 |
+
label="Furniture examples",
|
| 200 |
+
examples_per_page=6,
|
| 201 |
+
inputs=[condition_image],
|
| 202 |
+
)
|
| 203 |
with gr.Column(elem_id="col-right"):
|
| 204 |
gr.HTML(
|
| 205 |
r"""
|
requirements.txt
CHANGED
|
@@ -2,4 +2,4 @@ gradio
|
|
| 2 |
pillow
|
| 3 |
gradio_imageslider
|
| 4 |
requests
|
| 5 |
-
numpy
|
|
|
|
| 2 |
pillow
|
| 3 |
gradio_imageslider
|
| 4 |
requests
|
| 5 |
+
numpy
|