Spaces:
Runtime error
Runtime error
johnbradley
commited on
Commit
β’
01c15a8
1
Parent(s):
116dbd4
hf-model (#3)
Browse files- Download model from HF (7132b1836f51c77fbd76013a60d40d0d32f446e8)
- app.py +5 -0
- output/enhanced/model_final.pth +0 -3
- requirements.txt +1 -0
app.py
CHANGED
@@ -7,6 +7,11 @@ import cv2
|
|
7 |
from drexel_metadata.gen_metadata import gen_metadata
|
8 |
from PIL import Image
|
9 |
import urllib.request
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
|
12 |
EXAMPLE_URLS = [
|
|
|
7 |
from drexel_metadata.gen_metadata import gen_metadata
|
8 |
from PIL import Image
|
9 |
import urllib.request
|
10 |
+
from huggingface_hub import hf_hub_download
|
11 |
+
|
12 |
+
|
13 |
+
# Download model if not already cached locally
|
14 |
+
hf_hub_download(repo_id="imageomics/Drexel-metadata-generator", filename="model_final.pth", local_dir="output/enhanced")
|
15 |
|
16 |
|
17 |
EXAMPLE_URLS = [
|
output/enhanced/model_final.pth
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:4c021ad75105359524d9165c8ccec0be9de02b253eaf836c6916a6032f5c98fc
|
3 |
-
size 176294747
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -23,6 +23,7 @@ fvcore==0.1.5.post20220512
|
|
23 |
google-auth==2.13.0
|
24 |
google-auth-oauthlib==0.4.6
|
25 |
grpcio==1.50.0
|
|
|
26 |
hydra-core==1.2.0
|
27 |
idna==3.4
|
28 |
imageio==2.22.2
|
|
|
23 |
google-auth==2.13.0
|
24 |
google-auth-oauthlib==0.4.6
|
25 |
grpcio==1.50.0
|
26 |
+
huggingface-hub==0.16.4
|
27 |
hydra-core==1.2.0
|
28 |
idna==3.4
|
29 |
imageio==2.22.2
|