Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
yonigozlan committed Sep 19, 2024
1 parent 60be835 commit 8e6b55b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions src/transformers/models/paligemma/processing_paligemma.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""

import logging
import sys
from typing import List, Optional, Union

from ...feature_extraction_utils import BatchFeature
Expand All @@ -27,6 +26,7 @@
ProcessingKwargs,
ProcessorMixin,
TextKwargs,
Unpack,
_validate_images_text_input_order,
)
from ...tokenization_utils_base import (
Expand All @@ -36,12 +36,6 @@
)


if sys.version_info >= (3, 11):
from typing import Unpack
else:
from typing_extensions import Unpack


logger = logging.getLogger(__name__)

IMAGE_TOKEN = "<image>"
Expand Down
4 changes: 2 additions & 2 deletions tests/models/paligemma/test_processor_paligemma.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 The HuggingFace Team. All rights reserved.
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import shutil
import tempfile
import unittest
Expand Down Expand Up @@ -43,7 +44,6 @@ def setUp(self):
tokenizer = GemmaTokenizer(SAMPLE_VOCAB, keep_accents=True)
processor = PaliGemmaProcessor(image_processor=image_processor, tokenizer=tokenizer)
processor.save_pretrained(self.tmpdirname)
print(image_processor)

def tearDown(self):
shutil.rmtree(self.tmpdirname)
Expand Down

0 comments on commit 8e6b55b

Please sign in to comment.