Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -260,6 +260,7 @@ button.primary:hover {
|
|
| 260 |
}
|
| 261 |
"""
|
| 262 |
|
|
|
|
| 263 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
| 264 |
gr.HTML("""
|
| 265 |
<div class="main-title">
|
|
@@ -276,12 +277,8 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 276 |
input_image = gr.Image(
|
| 277 |
type="pil",
|
| 278 |
label="Upload Image",
|
| 279 |
-
|
| 280 |
-
interactive=True,
|
| 281 |
-
sources=["upload", "clipboard"] # tool 대신 sources 사용
|
| 282 |
)
|
| 283 |
-
|
| 284 |
-
|
| 285 |
with gr.Row():
|
| 286 |
text_prompt = gr.Textbox(
|
| 287 |
label="Object to Extract",
|
|
@@ -303,7 +300,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 303 |
output_display = ImageSlider(
|
| 304 |
label="Results",
|
| 305 |
show_download_button=False,
|
| 306 |
-
height=400,
|
| 307 |
visible=True
|
| 308 |
)
|
| 309 |
download_btn = gr.DownloadButton(
|
|
@@ -329,7 +325,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 329 |
with gr.Column(scale=1):
|
| 330 |
box_annotator = image_annotator(
|
| 331 |
image_type="pil",
|
| 332 |
-
height=400,
|
| 333 |
disable_edit_boxes=False,
|
| 334 |
show_download_button=False,
|
| 335 |
show_share_button=False,
|
|
@@ -337,8 +332,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 337 |
label="Draw Box Around Object",
|
| 338 |
interactive=True
|
| 339 |
)
|
| 340 |
-
|
| 341 |
-
|
| 342 |
box_btn = gr.Button(
|
| 343 |
"Extract Selection",
|
| 344 |
variant="primary",
|
|
@@ -349,7 +342,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 349 |
box_output = ImageSlider(
|
| 350 |
label="Results",
|
| 351 |
show_download_button=False,
|
| 352 |
-
height=400,
|
| 353 |
visible=True
|
| 354 |
)
|
| 355 |
box_download = gr.DownloadButton(
|
|
|
|
| 260 |
}
|
| 261 |
"""
|
| 262 |
|
| 263 |
+
# UI 부분만 수정
|
| 264 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
| 265 |
gr.HTML("""
|
| 266 |
<div class="main-title">
|
|
|
|
| 277 |
input_image = gr.Image(
|
| 278 |
type="pil",
|
| 279 |
label="Upload Image",
|
| 280 |
+
interactive=True
|
|
|
|
|
|
|
| 281 |
)
|
|
|
|
|
|
|
| 282 |
with gr.Row():
|
| 283 |
text_prompt = gr.Textbox(
|
| 284 |
label="Object to Extract",
|
|
|
|
| 300 |
output_display = ImageSlider(
|
| 301 |
label="Results",
|
| 302 |
show_download_button=False,
|
|
|
|
| 303 |
visible=True
|
| 304 |
)
|
| 305 |
download_btn = gr.DownloadButton(
|
|
|
|
| 325 |
with gr.Column(scale=1):
|
| 326 |
box_annotator = image_annotator(
|
| 327 |
image_type="pil",
|
|
|
|
| 328 |
disable_edit_boxes=False,
|
| 329 |
show_download_button=False,
|
| 330 |
show_share_button=False,
|
|
|
|
| 332 |
label="Draw Box Around Object",
|
| 333 |
interactive=True
|
| 334 |
)
|
|
|
|
|
|
|
| 335 |
box_btn = gr.Button(
|
| 336 |
"Extract Selection",
|
| 337 |
variant="primary",
|
|
|
|
| 342 |
box_output = ImageSlider(
|
| 343 |
label="Results",
|
| 344 |
show_download_button=False,
|
|
|
|
| 345 |
visible=True
|
| 346 |
)
|
| 347 |
box_download = gr.DownloadButton(
|