config.json

#13
by sambertus1234 - opened

I cant seem to get the code to work, it keeps asking me for a config.json, but i cant find that in your files, does anyone know what to do?

I encountered the same issue until I ran the following command in the Anaconda PowerShell Prompt:


from transformers import pipeline
generator = pipeline(task="YOUR_TASK_HERE", model="YOUR_MODEL_PATH_HERE")


Replace "YOUR_TASK_HERE" with the task you want to perform and "YOUR_MODEL_PATH_HERE" with the model name you want to use. After running the above code, the config.json file will automatically start downloading along with some additional necessary files. Once everything is downloaded, the program will work!

P.S. To ensure the model is downloaded, open your File Explorer, navigate to the cache directory, and see if a folder is available with the same name as the model name you downloaded:

On Windows: C:\Users\YourUsername.cache\huggingface
On macOS: ~/.cache/huggingface

Sign up or log in to comment