Spaces:
Runtime error
Runtime error
duplicate option
Browse files
app.py
CHANGED
|
@@ -35,9 +35,7 @@ for repo in urls:
|
|
| 35 |
for file in files:
|
| 36 |
url = hf_hub_url(repo, file)
|
| 37 |
name_ckp = url.split('/')[-1]
|
| 38 |
-
|
| 39 |
-
if os.path.exists(save_path) == False:
|
| 40 |
-
WTS_DICT[repo] = hf_hub_download(repo_id=repo, filename=file, token=os.environ.get("ACCESS_TOKEN"))
|
| 41 |
|
| 42 |
print(WTS_DICT)
|
| 43 |
apply_segmentor = OneformerSegmenter(WTS_DICT['shi-labs/oneformer_coco_swin_large'])
|
|
@@ -402,6 +400,13 @@ with block:
|
|
| 402 |
</div>
|
| 403 |
""")
|
| 404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 405 |
with gr.Tab('Edit Appearance'):
|
| 406 |
create_app_demo()
|
| 407 |
with gr.Tab('Edit Structure'):
|
|
@@ -410,5 +415,5 @@ with block:
|
|
| 410 |
create_both_demo()
|
| 411 |
|
| 412 |
|
| 413 |
-
|
| 414 |
block.launch(debug=True)
|
|
|
|
| 35 |
for file in files:
|
| 36 |
url = hf_hub_url(repo, file)
|
| 37 |
name_ckp = url.split('/')[-1]
|
| 38 |
+
WTS_DICT[repo] = hf_hub_download(repo_id=repo, filename=file, token=os.environ.get("ACCESS_TOKEN"))
|
|
|
|
|
|
|
| 39 |
|
| 40 |
print(WTS_DICT)
|
| 41 |
apply_segmentor = OneformerSegmenter(WTS_DICT['shi-labs/oneformer_coco_swin_large'])
|
|
|
|
| 400 |
</div>
|
| 401 |
""")
|
| 402 |
|
| 403 |
+
gr.HTML("""
|
| 404 |
+
<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings.
|
| 405 |
+
<br/>
|
| 406 |
+
<a href="https://huggingface.co/spaces/PAIR/PAIR-Diffusion?duplicate=true">
|
| 407 |
+
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
| 408 |
+
</p>""")
|
| 409 |
+
|
| 410 |
with gr.Tab('Edit Appearance'):
|
| 411 |
create_app_demo()
|
| 412 |
with gr.Tab('Edit Structure'):
|
|
|
|
| 415 |
create_both_demo()
|
| 416 |
|
| 417 |
|
| 418 |
+
block.queue(max_size=20)
|
| 419 |
block.launch(debug=True)
|