Spaces:
Sleeping
Sleeping
Ray commited on
Commit ·
22ccffa
1
Parent(s): f353743
update app and example
Browse files
app.py
CHANGED
|
@@ -293,7 +293,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 293 |
* **Refocusing:** 1. **Click** on the subject you want to bring into focus in the **Step 2** image preview.
|
| 294 |
2. Increase **K** (Blur Strength) to generate realistic bokeh effects based on the scene's depth.
|
| 295 |
|
| 296 |
-
> ⚠️ **Preprocessing Note:** Due to resource constraints in this demo, input images are **automatically resized** (
|
| 297 |
> If you wish to perform inference at the **original resolution**, please refer to our **[GitHub Code](https://github.com/nycu-cplab/Genfocus)** to run it locally.
|
| 298 |
""")
|
| 299 |
|
|
@@ -303,6 +303,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 303 |
# [Step 1: Upload]
|
| 304 |
with gr.Column(scale=1):
|
| 305 |
gr.Markdown("### Step 1: Upload Image")
|
|
|
|
| 306 |
|
| 307 |
input_raw = gr.Image(label="Raw Input Image", type="pil")
|
| 308 |
|
|
@@ -318,7 +319,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 318 |
|
| 319 |
with gr.Row():
|
| 320 |
click_status = gr.Textbox(label="Selected Coordinates", value="Center (Default)", interactive=False, scale=1)
|
| 321 |
-
k_slider = gr.Slider(minimum=0, maximum=50, value=
|
| 322 |
|
| 323 |
run_btn = gr.Button("✨ Run Genfocus", variant="primary", scale=1)
|
| 324 |
|
|
|
|
| 293 |
* **Refocusing:** 1. **Click** on the subject you want to bring into focus in the **Step 2** image preview.
|
| 294 |
2. Increase **K** (Blur Strength) to generate realistic bokeh effects based on the scene's depth.
|
| 295 |
|
| 296 |
+
> ⚠️ **Preprocessing Note:** Due to resource constraints in this demo, input images are **automatically resized** (longer edge = 512px).
|
| 297 |
> If you wish to perform inference at the **original resolution**, please refer to our **[GitHub Code](https://github.com/nycu-cplab/Genfocus)** to run it locally.
|
| 298 |
""")
|
| 299 |
|
|
|
|
| 303 |
# [Step 1: Upload]
|
| 304 |
with gr.Column(scale=1):
|
| 305 |
gr.Markdown("### Step 1: Upload Image")
|
| 306 |
+
gr.Markdown("Click an example or upload your own image.")
|
| 307 |
|
| 308 |
input_raw = gr.Image(label="Raw Input Image", type="pil")
|
| 309 |
|
|
|
|
| 319 |
|
| 320 |
with gr.Row():
|
| 321 |
click_status = gr.Textbox(label="Selected Coordinates", value="Center (Default)", interactive=False, scale=1)
|
| 322 |
+
k_slider = gr.Slider(minimum=0, maximum=50, value=20, step=1, label="Blur Strength (K)", scale=2)
|
| 323 |
|
| 324 |
run_btn = gr.Button("✨ Run Genfocus", variant="primary", scale=1)
|
| 325 |
|
example/{group_5.jpg → cello.jpg}
RENAMED
|
File without changes
|
example/{historic-photos.jpg → historic-photos.png}
RENAMED
|
File without changes
|