Spaces:
Sleeping
Sleeping
multimodalart commited on
Commit ·
5528e57
1
Parent(s): 8a2db1f
Remove cached_download stub (no longer needed with diffusers 0.36)
Browse files
app.py
CHANGED
|
@@ -5,18 +5,6 @@ from pathlib import Path
|
|
| 5 |
|
| 6 |
import spaces
|
| 7 |
|
| 8 |
-
# Old diffusers (0.28.0) imports `cached_download` from huggingface_hub, but
|
| 9 |
-
# gradio 5 requires huggingface_hub >= 0.33.5 where the symbol no longer exists.
|
| 10 |
-
# Stub it back as an import-time satisfaction; if anything actually calls it we
|
| 11 |
-
# raise so it surfaces clearly. See playbook Step 6b.
|
| 12 |
-
import huggingface_hub as _hf
|
| 13 |
-
if not hasattr(_hf, "cached_download"):
|
| 14 |
-
def _cached_download_removed(*a, **k):
|
| 15 |
-
raise NotImplementedError(
|
| 16 |
-
"huggingface_hub.cached_download was removed in 0.26."
|
| 17 |
-
)
|
| 18 |
-
_hf.cached_download = _cached_download_removed
|
| 19 |
-
|
| 20 |
import diffusers
|
| 21 |
import gradio as gr
|
| 22 |
import gradio
|
|
|
|
| 5 |
|
| 6 |
import spaces
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
import diffusers
|
| 9 |
import gradio as gr
|
| 10 |
import gradio
|