Spaces:
Running
Running
Update to PyTorch >= 2.0
Browse files- app.py +1 -1
- requirements.txt +7 -4
app.py
CHANGED
|
@@ -37,7 +37,7 @@ class App:
|
|
| 37 |
def _get_model(self, name):
|
| 38 |
if name in self._model_cache:
|
| 39 |
return self._model_cache[name]
|
| 40 |
-
model = torch.hub.load('baudm/parseq', name, pretrained=True).eval()
|
| 41 |
self._model_cache[name] = model
|
| 42 |
return model
|
| 43 |
|
|
|
|
| 37 |
def _get_model(self, name):
|
| 38 |
if name in self._model_cache:
|
| 39 |
return self._model_cache[name]
|
| 40 |
+
model = torch.hub.load('baudm/parseq', name, pretrained=True, trust_repo=True).eval()
|
| 41 |
self._model_cache[name] = model
|
| 42 |
return model
|
| 43 |
|
requirements.txt
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
| 5 |
nltk
|
|
|
|
| 1 |
+
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 2 |
+
|
| 3 |
+
gradio >=3.0.0, <4.0.0
|
| 4 |
+
torch >=2.0.0
|
| 5 |
+
torchvision >=0.15.0
|
| 6 |
+
pytorch-lightning ~=2.2.0
|
| 7 |
+
timm ~=0.9.16
|
| 8 |
nltk
|