Sakshi commited on
Commit
b099df3
·
1 Parent(s): 0557bd1

changed ContentFormat to DocumentContentFormat in ocr.py

Browse files
Files changed (1) hide show
  1. policy_analyser/ocr.py +2 -2
policy_analyser/ocr.py CHANGED
@@ -7,7 +7,7 @@
7
  import pymupdf4llm, pymupdf
8
  from azure.core.credentials import AzureKeyCredential
9
  from azure.ai.documentintelligence import DocumentIntelligenceClient
10
- from azure.ai.documentintelligence.models import AnalyzeDocumentRequest, ContentFormat, AnalyzeResult
11
 
12
  from policy_analyser import AZURE_LAYOUT_ENDPOINT, AZURE_LAYOUT_KEY, AZURE_LAYOUT_MODEL
13
 
@@ -44,7 +44,7 @@ class AzureDocumentIntelligenceOCR:
44
  poller = self.client.begin_analyze_document(
45
  AZURE_LAYOUT_MODEL,
46
  AnalyzeDocumentRequest(bytes_source = file_bytes),
47
- output_content_format = ContentFormat.MARKDOWN
48
  )
49
  result = poller.result()
50
  return result.content, None
 
7
  import pymupdf4llm, pymupdf
8
  from azure.core.credentials import AzureKeyCredential
9
  from azure.ai.documentintelligence import DocumentIntelligenceClient
10
+ from azure.ai.documentintelligence.models import AnalyzeDocumentRequest, DocumentContentFormat, AnalyzeResult
11
 
12
  from policy_analyser import AZURE_LAYOUT_ENDPOINT, AZURE_LAYOUT_KEY, AZURE_LAYOUT_MODEL
13
 
 
44
  poller = self.client.begin_analyze_document(
45
  AZURE_LAYOUT_MODEL,
46
  AnalyzeDocumentRequest(bytes_source = file_bytes),
47
+ output_content_format = DocumentContentFormat.MARKDOWN
48
  )
49
  result = poller.result()
50
  return result.content, None