-
Notifications
You must be signed in to change notification settings - Fork 2
/
fugumt-ja-en.bat
53 lines (51 loc) · 1.69 KB
/
fugumt-ja-en.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@echo off
setlocal enabledelayedexpansion
cd %~dp0
set MODEL=fugumt-ja-en
set FILE1=encoder_model.onnx
set FILE2=encoder_model.onnx.prototxt
set FILE3=decoder_model.onnx
set FILE4=decoder_model.onnx.prototxt
set FILE5=source.spm
set FILE6=target.spm
rem download
if not "%1" == "-h" if not "%1" == "--help" (
if not exist %FILE1% (
echo Downloading onnx file... ^(save path: %FILE1%^)
curl https://storage.googleapis.com/ailia-models/%MODEL%/%FILE1% -o %FILE1%
)
)
if not "%1" == "-h" if not "%1" == "--help" (
if not exist %FILE2% (
echo Downloading onnx file... ^(save path: %FILE2%^)
curl https://storage.googleapis.com/ailia-models/%MODEL%/%FILE2% -o %FILE2%
)
)
if not "%1" == "-h" if not "%1" == "--help" (
if not exist %FILE3% (
echo Downloading spm file... ^(save path: %FILE3%^)
curl https://storage.googleapis.com/ailia-models/%MODEL%/%FILE3% -o %FILE3%
)
)
if not "%1" == "-h" if not "%1" == "--help" (
if not exist %FILE4% (
echo Downloading spm file... ^(save path: %FILE4%^)
curl https://storage.googleapis.com/ailia-models/%MODEL%/%FILE4% -o %FILE4%
)
echo ONNX file and Prototxt file are prepared^^!
)
if not "%1" == "-h" if not "%1" == "--help" (
if not exist %FILE5% (
echo Downloading spm file... ^(save path: %FILE5%^)
curl https://storage.googleapis.com/ailia-models/%MODEL%/%FILE5% -o %FILE5%
)
)
if not "%1" == "-h" if not "%1" == "--help" (
if not exist %FILE6% (
echo Downloading spm file... ^(save path: %FILE6%^)
curl https://storage.googleapis.com/ailia-models/%MODEL%/%FILE6% -o %FILE6%
)
echo SPM files are prepared^^!
)
rem execute
.\%MODEL%.exe %*