fal-ai / fal

⚡ Fastest way to serve open source ML models to millions
https://fal.ai/docs
Apache License 2.0
201 stars 18 forks source link

feat(toolkit): add custom headers param to download utilities #219

Closed badayvedat closed 1 month ago

badayvedat commented 1 month ago

Added a new optional parameter verbose to the download_file function. This parameter, when set to True, will print messages to the console indicating the download progress. By default, it is set to True.

Wrapped the call to _get_remote_file_properties in a try-except block. This is to handle any exceptions that might occur during the call (e.g., a non-existing URL) and raise a DownloadError with a descriptive message.

I would be happy to replace this with a logger in the future to make it more clear.