apply plugin: 'de.undercouch.download'

task downloadLiteModel {
    def downloadFiles = [
        'https://s3.amazonaws.com/models.huggingface.co/bert/distilbert-base-uncased-distilled-squad-384.tflite': 'model.tflite',
//        'https://s3.amazonaws.com/models.huggingface.co/bert/distilbert-base-uncased-distilled-squad-384-fp16.tflite': 'model.tflite', // FP16 quantization version
//        'https://s3.amazonaws.com/models.huggingface.co/bert/distilbert-base-uncased-distilled-squad-384-8bits.tflite': 'model.tflite', // hybrid quantization version
    ]
    downloadFiles.each { key, value ->
      download {
          src key
          dest "$projectDir/src/main/assets/" + value
          overwrite false
      }
    }
}
