my-model / start.sh
kedhar4's picture
Upload 10 files
62f1804 verified
Raw
History Blame Contribute Delete
412 Bytes
#!/usr/bin/env bash
set -e
python - <<'PY'
from huggingface_hub import hf_hub_download
import os
try:
print('Pre-download model...')
hf_hub_download(repo_id=os.environ.get('MODEL_REPO'), filename='best_model.pkl', repo_type=os.environ.get('HF_REPO_TYPE'), token=os.environ.get('HF_TOKEN'))
except Exception as e:
print('Warning: could not pre-download:', e)
PY
exec python app_gradio.py