Spaces:
Sleeping
Sleeping
francescoKrnl
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ from src.pix2pix_turbo import Pix2Pix_Turbo
|
|
17 |
|
18 |
model = Pix2Pix_Turbo("sketch_to_image_stochastic")
|
19 |
|
20 |
-
ITEMS_NAMES = [ "π‘ Lamp","π Bag","ποΈ Sofa","πͺ Chair","ποΈ Car","ποΈ Motorbike"
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
22 |
DEFAULT_ITEM_NAME = "π‘ Lamp"
|
23 |
|
@@ -168,19 +168,19 @@ with gr.Blocks(css="style.css") as demo:
|
|
168 |
with gr.Group(elem_id="input_image_container", elem_classes="image_container" ):
|
169 |
image = gr.Image(
|
170 |
source="canvas", tool="color-sketch", type="pil", image_mode="L",
|
171 |
-
invert_colors=True, shape=(512, 512), brush_radius=4, height=
|
172 |
brush_color="#000000", interactive=True, show_download_button=False, elem_id="input_image", show_label=False)
|
173 |
gr.HTML("""<img src="assets/drawCta.png" id="draw_cta" alt="draw here image" />
|
174 |
<button id="eraser" onclick="return DELETE_SKETCH_FUNCTION(this)">
|
175 |
<span id="eraser_icon"></span>
|
176 |
</button>""",elem_id="eraser_container")
|
177 |
with gr.Group(elem_id="output_image_container", elem_classes="image_container"):
|
178 |
-
result = gr.Image(label="Result",
|
179 |
with gr.Row(elem_id="radio_row"):
|
180 |
-
item = gr.Radio(choices=ITEMS_NAMES, value=DEFAULT_ITEM_NAME, show_label=False)
|
181 |
-
gr.HTML("""<div id="footer_block">
|
182 |
-
|
183 |
-
|
184 |
|
185 |
demo.load(None,None,None,_js=scripts)
|
186 |
inputs = [image, item]
|
|
|
17 |
|
18 |
model = Pix2Pix_Turbo("sketch_to_image_stochastic")
|
19 |
|
20 |
+
ITEMS_NAMES = [ "π‘ Lamp","π Bag","ποΈ Sofa","πͺ Chair","ποΈ Car","ποΈ Motorbike"]
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
22 |
DEFAULT_ITEM_NAME = "π‘ Lamp"
|
23 |
|
|
|
168 |
with gr.Group(elem_id="input_image_container", elem_classes="image_container" ):
|
169 |
image = gr.Image(
|
170 |
source="canvas", tool="color-sketch", type="pil", image_mode="L",
|
171 |
+
invert_colors=True, shape=(512, 512), brush_radius=4, height="100%", width="100%",
|
172 |
brush_color="#000000", interactive=True, show_download_button=False, elem_id="input_image", show_label=False)
|
173 |
gr.HTML("""<img src="assets/drawCta.png" id="draw_cta" alt="draw here image" />
|
174 |
<button id="eraser" onclick="return DELETE_SKETCH_FUNCTION(this)">
|
175 |
<span id="eraser_icon"></span>
|
176 |
</button>""",elem_id="eraser_container")
|
177 |
with gr.Group(elem_id="output_image_container", elem_classes="image_container"):
|
178 |
+
result = gr.Image(label="Result", height="100%", width="100%", elem_id="output_image", show_label=False, show_download_button=True)
|
179 |
with gr.Row(elem_id="radio_row"):
|
180 |
+
item = gr.Radio(choices=ITEMS_NAMES, value=DEFAULT_ITEM_NAME, show_label=False, container=False)
|
181 |
+
# gr.HTML("""<div id="footer_block">
|
182 |
+
# <button id="fullscreen" onclick="document.body.querySelector('.contain').requestFullscreen();" class="fullscreen" title="fullscreen"></button>
|
183 |
+
# </div>""")
|
184 |
|
185 |
demo.load(None,None,None,_js=scripts)
|
186 |
inputs = [image, item]
|