Spaces:
Running
Running
Rachel Ding commited on
Commit ·
5b712d9
1
Parent(s): 087ec71
Fix Gradio 6.0 API and allow HF cache path for Spaces
Browse files
app.py
CHANGED
|
@@ -53,7 +53,7 @@ def build_comparison(sample_id: str | None):
|
|
| 53 |
return specs[:4], audios[:4]
|
| 54 |
|
| 55 |
|
| 56 |
-
with gr.Blocks() as app:
|
| 57 |
gr.Markdown("# NearestNeighbor Audio Demo")
|
| 58 |
gr.Markdown("Data from [AE-W/batch_outputs](https://huggingface.co/datasets/AE-W/batch_outputs)")
|
| 59 |
|
|
@@ -136,8 +136,4 @@ _hf_hub_cache = os.environ.get(
|
|
| 136 |
"HUGGINGFACE_HUB_CACHE",
|
| 137 |
os.path.join(os.path.expanduser("~"), ".cache", "huggingface", "hub"),
|
| 138 |
)
|
| 139 |
-
app.launch(
|
| 140 |
-
title="NearestNeighbor Audio Demo",
|
| 141 |
-
css=".gradio-container { max-width: 1200px; }",
|
| 142 |
-
allowed_paths=[_hf_hub_cache],
|
| 143 |
-
)
|
|
|
|
| 53 |
return specs[:4], audios[:4]
|
| 54 |
|
| 55 |
|
| 56 |
+
with gr.Blocks(title="NearestNeighbor Audio Demo", css=".gradio-container { max-width: 1200px; }") as app:
|
| 57 |
gr.Markdown("# NearestNeighbor Audio Demo")
|
| 58 |
gr.Markdown("Data from [AE-W/batch_outputs](https://huggingface.co/datasets/AE-W/batch_outputs)")
|
| 59 |
|
|
|
|
| 136 |
"HUGGINGFACE_HUB_CACHE",
|
| 137 |
os.path.join(os.path.expanduser("~"), ".cache", "huggingface", "hub"),
|
| 138 |
)
|
| 139 |
+
app.launch(allowed_paths=[_hf_hub_cache])
|
|
|
|
|
|
|
|
|
|
|
|