joycaption
joycaption copied to clipboard
How to load model files from a designated drive when using a gradio app.
By default, the gradio app does not allow specifying models downloaded to arbitrary locations. Which part of the code should be modified to allow setting a custom model path? Also, how should the configuration be structured to switch between the full and quantized versions of the model?
It uses huggingface transformers, so the model gets downloaded by default under ~/.cache/huggingface. According to HF's docs (https://huggingface.co/docs/huggingface_hub/en/package_reference/environment_variables) you can influence that using the environment variables HF_HOME or HF_HUB_CACHE.