Skip to content

Commit

Permalink
file name cleanup (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
DhruvaBansal00 authored Dec 4, 2024
1 parent 84f5762 commit 25d51d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/autolabel/transforms/ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class OCRTransform(BaseTransform):

"""
Extract text from documents using OCR.
Expand Down Expand Up @@ -126,7 +125,7 @@ def download_file(self, file_location: str) -> str:

import requests

ext = Path(file_location).suffix
ext = Path(file_location).suffix.split("?")[0]
with tempfile.NamedTemporaryFile(suffix=ext, delete=False) as temp_file:
response = requests.get(file_location, timeout=30)
response.raise_for_status()
Expand Down

0 comments on commit 25d51d4

Please sign in to comment.