Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ try:
|
|
| 24 |
"transformers>=4.48.0"
|
| 25 |
])
|
| 26 |
|
| 27 |
-
#
|
| 28 |
for key in list(sys.modules.keys()):
|
| 29 |
if key.startswith('huggingface_hub'):
|
| 30 |
del sys.modules[key]
|
|
@@ -59,6 +59,10 @@ import spaces
|
|
| 59 |
import torch
|
| 60 |
from PIL import Image
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
|
| 64 |
|
|
|
|
| 24 |
"transformers>=4.48.0"
|
| 25 |
])
|
| 26 |
|
| 27 |
+
# Alle alten Cache-Reste aus dem Speicher werfen
|
| 28 |
for key in list(sys.modules.keys()):
|
| 29 |
if key.startswith('huggingface_hub'):
|
| 30 |
del sys.modules[key]
|
|
|
|
| 59 |
import torch
|
| 60 |
from PIL import Image
|
| 61 |
|
| 62 |
+
# WICHTIG: Hier importieren wir die Funktion für die App frisch neu!
|
| 63 |
+
from huggingface_hub import hf_hub_download
|
| 64 |
+
|
| 65 |
+
|
| 66 |
|
| 67 |
|
| 68 |
|