Commit
•
4ea8c70
1
Parent(s):
8801de4
Update README.md
Browse files
README.md
CHANGED
@@ -31,12 +31,12 @@ model.to(device)
|
|
31 |
|
32 |
context_length = 2048
|
33 |
|
34 |
-
def predict(
|
35 |
# prepare PDF image for the model
|
36 |
-
image = Image.open(
|
37 |
pixel_values = processor(image, return_tensors="pt").pixel_values
|
38 |
|
39 |
-
# generate transcription
|
40 |
outputs = model.generate(
|
41 |
pixel_values.to(device),
|
42 |
min_length=1,
|
|
|
31 |
|
32 |
context_length = 2048
|
33 |
|
34 |
+
def predict(img_path):
|
35 |
# prepare PDF image for the model
|
36 |
+
image = Image.open(img_path)
|
37 |
pixel_values = processor(image, return_tensors="pt").pixel_values
|
38 |
|
39 |
+
# generate transcription
|
40 |
outputs = model.generate(
|
41 |
pixel_values.to(device),
|
42 |
min_length=1,
|