More logging + timeout if model is not loaded + url not needed

#4
by Wauplin HF staff - opened

Hey @merve ๐Ÿค—

Suggesting a couple of changes in how to use huggingface_hub. Feel free to ignore if you prefer the way it was:

  1. Enable more logging using logging.set_verbosity_info() => this will help in case you need to debug something not work. Typically if the endpoint is not available.
  2. Add timeout=60 to the client => by default the InferenceClient will retry indefinitely until the model is ready. You might want to set a timeout here instead.
  3. When using the InferenceAPI, no need to paste the full url. Setting model="meta-llama/Llama-2-7b-chat-hf" is enough (pasting the full URL is not wrong btw)
Cannot merge
This branch has merge conflicts in the following files:
  • app.py

Sign up or log in to comment