Spaces:
Runtime error
Runtime error
menghanxia
commited on
Commit
•
aa8edf3
1
Parent(s):
6e70c4a
created the space
Browse files- app.py +3 -3
- checkpoints/ckpt_download.sh +1 -0
app.py
CHANGED
@@ -12,9 +12,9 @@ if RUN_MODE != "local":
|
|
12 |
os.system("wget https://huggingface.co/menghanxia/ReversibleHalftoning/resolve/main/model_best.pth.tar")
|
13 |
os.rename("model_best.pth.tar", "./checkpoints/model_best.pth.tar")
|
14 |
## examples
|
15 |
-
os.system("wget https://huggingface.co/menghanxia/
|
16 |
-
os.system("wget https://huggingface.co/menghanxia/
|
17 |
-
os.system("wget https://huggingface.co/menghanxia/
|
18 |
|
19 |
## step 1: set up model
|
20 |
device = "cpu"
|
|
|
12 |
os.system("wget https://huggingface.co/menghanxia/ReversibleHalftoning/resolve/main/model_best.pth.tar")
|
13 |
os.rename("model_best.pth.tar", "./checkpoints/model_best.pth.tar")
|
14 |
## examples
|
15 |
+
os.system("wget https://huggingface.co/menghanxia/ReversibleHalftoning/resolve/main/girl.png")
|
16 |
+
os.system("wget https://huggingface.co/menghanxia/ReversibleHalftoning/resolve/main/wave.png")
|
17 |
+
os.system("wget https://huggingface.co/menghanxia/ReversibleHalftoning/resolve/main/painting.png")
|
18 |
|
19 |
## step 1: set up model
|
20 |
device = "cpu"
|
checkpoints/ckpt_download.sh
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1kw-FoS8lF_tgdiCkGG51UaUtmCcFvKiD' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1kw-FoS8lF_tgdiCkGG51UaUtmCcFvKiD" -O model_best.pth.tar && rm -rf /tmp/cookies.txt
|