Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,9 +21,12 @@ MAX_MAX_NEW_TOKENS = 2048
|
|
| 21 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
| 22 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 23 |
|
|
|
|
|
|
|
| 24 |
model_id = 'Qwen/Qwen2.5-VL-3B-Instruct'
|
| 25 |
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 26 |
-
|
|
|
|
| 27 |
# torch_dtype=torch.bfloat16,
|
| 28 |
# attn_implementation="flash_attention_2",
|
| 29 |
device_map="auto"
|
|
|
|
| 21 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
| 22 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 23 |
|
| 24 |
+
auth_token = os.environ.get("HF_TOKEN")
|
| 25 |
+
|
| 26 |
model_id = 'Qwen/Qwen2.5-VL-3B-Instruct'
|
| 27 |
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 28 |
+
'farrell236/test_model',
|
| 29 |
+
use_auth_token=auth_token,
|
| 30 |
# torch_dtype=torch.bfloat16,
|
| 31 |
# attn_implementation="flash_attention_2",
|
| 32 |
device_map="auto"
|