Spaces:
Sleeping
Sleeping
Download download_model.py from Frederic-CellNum/api_sparrow_ocr: direct link, hf CLI and curl.
- Browser
- Download file 367 Bytes
-
https://huggingface.co/spaces/Frederic-CellNum/api_sparrow_ocr/resolve/main/download_model.py
- Command line
-
hf download hf://spaces/Frederic-CellNum/api_sparrow_ocr/download_model.py
-
curl -L -o download_model.py https://huggingface.co/spaces/Frederic-CellNum/api_sparrow_ocr/resolve/main/download_model.py
367 Bytes
| from transformers import Qwen2VLForConditionalGeneration, AutoProcessor | |
| print("Téléchargement du processor...") | |
| AutoProcessor.from_pretrained("Qwen/Qwen2-VL-7B-Instruct") | |
| print("Téléchargement du modèle...") | |
| Qwen2VLForConditionalGeneration.from_pretrained( | |
| "Qwen/Qwen2-VL-7B-Instruct", | |
| torch_dtype="auto" | |
| ) | |
| print("Modèle téléchargé avec succès!") |