forked from huggingface/tflite-android-transformers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
download.gradle
19 lines (18 loc) · 966 Bytes
/
download.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
apply plugin: 'de.undercouch.download'
task downloadLiteModel {
def downloadFiles = [
"https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-vocab.json": "gpt2-vocab.json",
"https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-merges.txt": "gpt2-merges.txt",
"https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-64-fp16.tflite": "model.tflite", // FP16 quantization version
// "https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-64-8bits.tflite": "model.tflite", // 8-bit integers version
// "https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-64.tflite": "model.tflite", // "raw" version
// "https://s3.amazonaws.com/models.huggingface.co/bert/distilgpt2-64.tflite": "model.tflite", // Distilled version
]
downloadFiles.each { key, value ->
download {
src key
dest "$projectDir/src/main/assets/$value"
overwrite false
}
}
}