Frederic-CellNum commited on
Commit
82aed82
·
verified ·
1 Parent(s): 6ae3c94

Create download_model.py

Browse files
Files changed (1) hide show
  1. download_model.py +12 -0
download_model.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
2
+
3
+ print("Téléchargement du processor...")
4
+ AutoProcessor.from_pretrained("Qwen/Qwen2-VL-7B-Instruct")
5
+
6
+ print("Téléchargement du modèle...")
7
+ Qwen2VLForConditionalGeneration.from_pretrained(
8
+ "Qwen/Qwen2-VL-7B-Instruct",
9
+ torch_dtype="auto"
10
+ )
11
+
12
+ print("Modèle téléchargé avec succès!")