File tree Expand file tree Collapse file tree 4 files changed +3
-12
lines changed
Expand file tree Collapse file tree 4 files changed +3
-12
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1414redis_url = os .getenv ('REDIS_CACHE_URL' , 'redis://redis:6379/1' )
1515redis_client = redis .StrictRedis .from_url (redis_url )
1616
17+
1718@celery_app .task (bind = True )
1819def ocr_task (
1920 self ,
@@ -47,7 +48,6 @@ def ocr_task(
4748
4849 if extracted_text is None :
4950 print ("Extracting text from PDF..." )
50- elapsed_time = time .time () - start_time
5151 self .update_state (state = 'PROGRESS' ,
5252 meta = {'progress' : 30 , 'status' : 'Extracting text from PDF' , 'start_time' : start_time ,
5353 'elapsed_time' : time .time () - start_time }) # Example progress update
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class ImageSupportedExportFormats(Enum):
1212 TIFF = "TIFF"
1313
1414class ImageFileFormat (FileFormat ):
15- default_filename = 'default_filename.jpg'
15+ DEFAULT_FILENAME : str = "image.jpeg"
1616
1717 @staticmethod
1818 def accepted_mime_types () -> list [str ]:
Original file line number Diff line number Diff line change 44
55
66class PdfFileFormat (FileFormat ):
7- default_filename = 'default_filename .pdf'
7+ DEFAULT_FILENAME : str = "image .pdf"
88
99 @staticmethod
1010 def accepted_mime_types () -> list [str ]:
You can’t perform that action at this time.
0 commit comments