MohamedRashad commited on
Commit
4ea8c70
1 Parent(s): 8801de4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -31,12 +31,12 @@ model.to(device)
31
 
32
  context_length = 2048
33
 
34
- def predict(image):
35
  # prepare PDF image for the model
36
- image = Image.open(image)
37
  pixel_values = processor(image, return_tensors="pt").pixel_values
38
 
39
- # generate transcription (here we only generate 30 tokens)
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,