Skip to content

Commit

Permalink
Rename as Model.needsAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
junjiang-lab committed Feb 13, 2025
1 parent dfe5a42 commit 42ec570
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private fun downloadModel(context: Context, model: Model, client: OkHttpClient,
val outputFile = File(context.filesDir, File(InferenceModel.model.path).name)
val requestBuilder = Request.Builder().url(model.url)

if (model.needAuth && model.url.startsWith("https://huggingface.co/")) {
if (model.needsAuth && model.url.startsWith("https://huggingface.co/")) {
val hfAccessToken = BuildConfig.HF_ACCESS_TOKEN
if (hfAccessToken.isEmpty()) {
throw MissingAccessTokenException()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package com.google.mediapipe.examples.llminference
enum class Model(
val path: String,
val url: String,
val needAuth: Boolean,
val needsAuth: Boolean,
val uiState: UiState,
val temperature: Float,
val topK: Int,
Expand All @@ -14,7 +14,7 @@ enum class Model(
GEMMA_CPU(
path = "/data/local/tmp/llm/gemma-2b-it-cpu-int4.bin",
url = "",
needAuth = false,
needsAuth = true,
GemmaUiState(),
temperature = 0.8f,
topK = 40,
Expand All @@ -23,7 +23,7 @@ enum class Model(
GEMMA_GPU(
path = "/data/local/tmp/llm/gemma-2b-it-gpu-int4.bin",
url = "",
needAuth = false,
needsAuth = true,
GemmaUiState(),
temperature = 0.8f,
topK = 40,
Expand All @@ -32,7 +32,7 @@ enum class Model(
DEEPSEEK_CPU(
path = "/data/local/tmp/llm/deepseek3k_q8_ekv1280.task",
url = "",
needAuth = false,
needsAuth = false,
DeepSeeUiState(),
temperature = 0.6f,
topK = 40,
Expand Down

0 comments on commit 42ec570

Please sign in to comment.