benchang1110
commited on
Commit
•
e1f4033
1
Parent(s):
c1a2440
Upload processor
Browse files
processing_taivisionlm.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
"""
|
2 |
-
Processor class for
|
3 |
"""
|
4 |
import transformers
|
5 |
import logging
|
@@ -300,12 +300,12 @@ class TaiVisionProcessor(ProcessorMixin):
|
|
300 |
|
301 |
|
302 |
# if __name__ == '__main__':
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
|
310 |
# from PIL import Image
|
311 |
# import requests
|
|
|
1 |
"""
|
2 |
+
Processor class for TaiVisionLM.
|
3 |
"""
|
4 |
import transformers
|
5 |
import logging
|
|
|
300 |
|
301 |
|
302 |
# if __name__ == '__main__':
|
303 |
+
# config = TaiVisionLMConfig.from_pretrained("./")
|
304 |
+
# preprocessor = transformers.SiglipImageProcessor.from_pretrained("google/siglip-base-patch16-224")
|
305 |
+
# preprocessor.image_seq_length = config.num_image_tokens
|
306 |
+
# tokenizer = transformers.AutoTokenizer.from_pretrained("benchang1110/Taiwan-tinyllama-v1.0-chat")
|
307 |
+
# processor = TaiVisionProcessor(tokenizer=tokenizer, image_processor=preprocessor)
|
308 |
+
# processor.save_pretrained("./")
|
309 |
|
310 |
# from PIL import Image
|
311 |
# import requests
|