Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ with gr.Blocks() as app:
|
|
41 |
gr.Markdown("""
|
42 |
# HINet (or INR-Harmonization) - A novel image Harmonization method based on Implicit neural Networks
|
43 |
## Harmonize any image you want! Arbitrary resolution, and arbitrary aspect ratio!
|
44 |
-
### Official Gradio Demo
|
45 |
**Since Gradio Space only support CPU, the speed may kind of slow. You may better download the code to run locally with a GPU.**
|
46 |
<a href="https://huggingface.co/spaces/WindVChen/INR-Harmon?duplicate=true" style="display: inline-block;margin-top: .5em;margin-right: .25em;" target="_blank">
|
47 |
<img style="margin-bottom: 0em;display: inline;margin-top: -.25em;" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> for no queue on your own hardware.</p>
|
@@ -198,7 +198,7 @@ with gr.Blocks() as app:
|
|
198 |
opt.split_resolution = form_split_res
|
199 |
opt.save_path = None
|
200 |
opt.workers = 0
|
201 |
-
opt.device = "
|
202 |
|
203 |
composite_image = np.asarray(form_composite_image)
|
204 |
mask = np.asarray(form_mask_image)
|
@@ -219,7 +219,7 @@ with gr.Blocks() as app:
|
|
219 |
opt.split_num = int(form_split_num)
|
220 |
opt.save_path = None
|
221 |
opt.workers = 0
|
222 |
-
opt.device = "
|
223 |
|
224 |
composite_image = np.asarray(form_composite_image)
|
225 |
mask = np.asarray(form_mask_image)
|
@@ -276,4 +276,4 @@ gr.close_all()
|
|
276 |
|
277 |
app.queue(concurrency_count=1, max_size=200, api_open=False)
|
278 |
|
279 |
-
app.launch(show_api=False)
|
|
|
41 |
gr.Markdown("""
|
42 |
# HINet (or INR-Harmonization) - A novel image Harmonization method based on Implicit neural Networks
|
43 |
## Harmonize any image you want! Arbitrary resolution, and arbitrary aspect ratio!
|
44 |
+
### Official Gradio Demo. See here for [**How to play with this Space**](https://github.com/WindVChen/INR-Harmonization/blob/main/assets/demo.gif)
|
45 |
**Since Gradio Space only support CPU, the speed may kind of slow. You may better download the code to run locally with a GPU.**
|
46 |
<a href="https://huggingface.co/spaces/WindVChen/INR-Harmon?duplicate=true" style="display: inline-block;margin-top: .5em;margin-right: .25em;" target="_blank">
|
47 |
<img style="margin-bottom: 0em;display: inline;margin-top: -.25em;" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> for no queue on your own hardware.</p>
|
|
|
198 |
opt.split_resolution = form_split_res
|
199 |
opt.save_path = None
|
200 |
opt.workers = 0
|
201 |
+
opt.device = "cpu"
|
202 |
|
203 |
composite_image = np.asarray(form_composite_image)
|
204 |
mask = np.asarray(form_mask_image)
|
|
|
219 |
opt.split_num = int(form_split_num)
|
220 |
opt.save_path = None
|
221 |
opt.workers = 0
|
222 |
+
opt.device = "cpu"
|
223 |
|
224 |
composite_image = np.asarray(form_composite_image)
|
225 |
mask = np.asarray(form_mask_image)
|
|
|
276 |
|
277 |
app.queue(concurrency_count=1, max_size=200, api_open=False)
|
278 |
|
279 |
+
app.launch(show_api=False)
|