AMKCode commited on
Commit
9f33a27
1 Parent(s): 888f274

removed oauth

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -3
  2. app.py +5 -4
Dockerfile CHANGED
@@ -39,9 +39,8 @@ RUN pyenv install ${PYTHON_VERSION} && \
39
  pyenv rehash && \
40
  pip install --no-cache-dir -U pip setuptools wheel && \
41
  pip install "huggingface-hub" "hf-transfer" "gradio[oauth]>=4.28.0" "gradio_huggingfacehub_search==0.0.7" "APScheduler" && \
42
- pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu && \
43
- pip install "starlette-session"
44
-
45
  COPY --chown=1000 . ${HOME}/app
46
 
47
  ENV PYTHONPATH=${HOME}/app \
 
39
  pyenv rehash && \
40
  pip install --no-cache-dir -U pip setuptools wheel && \
41
  pip install "huggingface-hub" "hf-transfer" "gradio[oauth]>=4.28.0" "gradio_huggingfacehub_search==0.0.7" "APScheduler" && \
42
+ pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
43
+
 
44
  COPY --chown=1000 . ${HOME}/app
45
 
46
  ENV PYTHONPATH=${HOME}/app \
app.py CHANGED
@@ -69,11 +69,12 @@ QUANTIZATIONS = ["q0f16",
69
  "q4f32_1",
70
  "q4f16_awq"]
71
 
72
- def button_click(hf_model_id, conv_template, quantization, oauth_token: gr.OAuthToken | None):
73
- if not oauth_token.token:
74
- raise ValueError("Log in to Huggingface to use this")
75
 
76
- api = HfApi(token=oauth_token.token)
 
77
  model_dir_name = hf_model_id.split("/")[1]
78
  mlc_model_name = model_dir_name + "-" + quantization + "-" + "MLC"
79
 
 
69
  "q4f32_1",
70
  "q4f16_awq"]
71
 
72
+ def button_click(hf_model_id, conv_template, quantization):
73
+ # if not oauth_token.token:
74
+ # raise ValueError("Log in to Huggingface to use this")
75
 
76
+ # api = HfApi(token=oauth_token.token)
77
+ api = HfApi()
78
  model_dir_name = hf_model_id.split("/")[1]
79
  mlc_model_name = model_dir_name + "-" + quantization + "-" + "MLC"
80