jonathanjordan21 commited on
Commit
c8e9285
1 Parent(s): 7fe9298

Fix boilerplate import

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -35,7 +35,6 @@ Json Parsed Output :
35
 
36
  Load Donut Processor and Model
37
  ```python
38
- import re
39
  from transformers import DonutProcessor, VisionEncoderDecoderModel
40
 
41
  # Load processor
@@ -49,6 +48,8 @@ Create JSON parser
49
  ```python
50
  from PIL import Image
51
  from io import BytesIO
 
 
52
  import torch
53
 
54
  def get_komposisi(image_path, image=None):
@@ -82,8 +83,7 @@ def get_komposisi(image_path, image=None):
82
  Get json output from an image
83
  ```python
84
  import requests
85
- import io
86
 
87
  image = requests.get('https://pintarjualan.id/wp-content/uploads/sites/2/2022/04/label-nustrisi-fact-1.png').content
88
- print(get_komposisi("", Image.open(io.BytesIO(image))))
89
  ```
 
35
 
36
  Load Donut Processor and Model
37
  ```python
 
38
  from transformers import DonutProcessor, VisionEncoderDecoderModel
39
 
40
  # Load processor
 
48
  ```python
49
  from PIL import Image
50
  from io import BytesIO
51
+ import re
52
+
53
  import torch
54
 
55
  def get_komposisi(image_path, image=None):
 
83
  Get json output from an image
84
  ```python
85
  import requests
 
86
 
87
  image = requests.get('https://pintarjualan.id/wp-content/uploads/sites/2/2022/04/label-nustrisi-fact-1.png').content
88
+ print(get_komposisi("", Image.open(BytesIO(image))))
89
  ```