asony999 commited on
Commit
3f8f017
Β·
verified Β·
1 Parent(s): afb93bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -7,12 +7,14 @@ from pdf2image import convert_from_path
7
  from google.cloud import documentai_v1 as documentai
8
  from presidio_analyzer import AnalyzerEngine
9
  from presidio_anonymizer import AnonymizerEngine
 
 
10
 
11
  # βœ… Step 1: Set Google Cloud Credentials
12
  os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "document-ai-anonymizer.json"
13
 
14
  # βœ… Step 2: Initialize Google Cloud Document AI Client
15
- client = documentai.DocumentUnderstandingServiceClient()
16
 
17
  # βœ… Step 3: Initialize Presidio Analyzer & Anonymizer
18
  analyzer = AnalyzerEngine()
 
7
  from google.cloud import documentai_v1 as documentai
8
  from presidio_analyzer import AnalyzerEngine
9
  from presidio_anonymizer import AnonymizerEngine
10
+ from google.cloud import documentai_v1 as documentai
11
+
12
 
13
  # βœ… Step 1: Set Google Cloud Credentials
14
  os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "document-ai-anonymizer.json"
15
 
16
  # βœ… Step 2: Initialize Google Cloud Document AI Client
17
+ client = documentai.DocumentProcessorServiceClient()
18
 
19
  # βœ… Step 3: Initialize Presidio Analyzer & Anonymizer
20
  analyzer = AnalyzerEngine()