moondream
moondream copied to clipboard
Model Download path
I try to run a gradio app, and it starts downloading models at first run. Unfortunately, I have lake of space on my C drive. Is there a way to define a location for model download?
Thanks in advance
If you are using Windows, the following bat script may meet your needs. ` @echo off
set HF_HOME=huggingface
call venv\Scripts\activate # Your virtual environment activation script python gradio_demo.py
pause ` In this way, the model file will be located in the huggingface folder in the project directory.
Where I put this? I am a little noob in programming yet.
Have you created a virtual environment?
Yes I made environment, and installed all requirement.txt dependencies.
You can search for activate.bat, or if you are creating a virtual environment by Conda, you need to find the Python location of the virtual environment and see what kind of virtual environment you have. Then you also need to see how your virtual environment path works. The situation is quite complicated, and I'm not sure about you either. Of course, if you know how to activate a virtual environment, then write down the command you activated so that I can understand better. You can refer to the following code
@echo off
set HF_HOME=huggingface # This will set your model path
call venv\Scripts\activate # Your virtual environment activation script
python gradio_demo.py # Start the gradio script
pause
to create venv I used - python -m venv venv to activate venv i just type venv\scipts\activate to deactivae - deactivate
so where should i add above?
You can start directly using this script in my fork.