Dileep7729 commited on
Commit
b2f9537
·
verified ·
1 Parent(s): 1408f11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,7 +6,8 @@ import torch
6
  # Load the fine-tuned model and processor from local files
7
  model_path = "./" # Path to the directory containing the uploaded model files
8
  model = LayoutLMv3ForTokenClassification.from_pretrained(model_path)
9
- processor = LayoutLMv3Processor.from_pretrained(model_path)
 
10
 
11
  # Define label mapping
12
  id2label = {0: "company", 1: "date", 2: "address", 3: "total", 4: "other"}
 
6
  # Load the fine-tuned model and processor from local files
7
  model_path = "./" # Path to the directory containing the uploaded model files
8
  model = LayoutLMv3ForTokenClassification.from_pretrained(model_path)
9
+ processor = LayoutLMv3Processor.from_pretrained(model_path, apply_ocr=True)
10
+
11
 
12
  # Define label mapping
13
  id2label = {0: "company", 1: "date", 2: "address", 3: "total", 4: "other"}