Upload Qwen_Qwen3-VL-Reranker-2B_0.py with huggingface_hub
Browse files
Qwen_Qwen3-VL-Reranker-2B_0.py
CHANGED
|
@@ -20,10 +20,11 @@
|
|
| 20 |
# ///
|
| 21 |
|
| 22 |
try:
|
| 23 |
-
#
|
| 24 |
-
from transformers import
|
| 25 |
|
| 26 |
-
|
|
|
|
| 27 |
with open('Qwen_Qwen3-VL-Reranker-2B_0.txt', 'w', encoding='utf-8') as f:
|
| 28 |
f.write('Everything was good in Qwen_Qwen3-VL-Reranker-2B_0.txt')
|
| 29 |
except Exception as e:
|
|
@@ -38,10 +39,11 @@ except Exception as e:
|
|
| 38 |
with open('Qwen_Qwen3-VL-Reranker-2B_0.txt', 'a', encoding='utf-8') as f:
|
| 39 |
import traceback
|
| 40 |
f.write('''```CODE:
|
| 41 |
-
#
|
| 42 |
-
from transformers import
|
| 43 |
|
| 44 |
-
|
|
|
|
| 45 |
```
|
| 46 |
|
| 47 |
ERROR:
|
|
|
|
| 20 |
# ///
|
| 21 |
|
| 22 |
try:
|
| 23 |
+
# Load model directly
|
| 24 |
+
from transformers import AutoProcessor, AutoModelForImageTextToText
|
| 25 |
|
| 26 |
+
processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-Reranker-2B")
|
| 27 |
+
model = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3-VL-Reranker-2B")
|
| 28 |
with open('Qwen_Qwen3-VL-Reranker-2B_0.txt', 'w', encoding='utf-8') as f:
|
| 29 |
f.write('Everything was good in Qwen_Qwen3-VL-Reranker-2B_0.txt')
|
| 30 |
except Exception as e:
|
|
|
|
| 39 |
with open('Qwen_Qwen3-VL-Reranker-2B_0.txt', 'a', encoding='utf-8') as f:
|
| 40 |
import traceback
|
| 41 |
f.write('''```CODE:
|
| 42 |
+
# Load model directly
|
| 43 |
+
from transformers import AutoProcessor, AutoModelForImageTextToText
|
| 44 |
|
| 45 |
+
processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-Reranker-2B")
|
| 46 |
+
model = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3-VL-Reranker-2B")
|
| 47 |
```
|
| 48 |
|
| 49 |
ERROR:
|