Spaces:
Runtime error
Runtime error
konfuzio-com
commited on
Commit
·
57ccea7
1
Parent(s):
25025d0
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,7 @@ import easyocr
|
|
10 |
#torch.hub.download_url_to_file('https://github.com/AaronCWacker/Yggdrasil/blob/main/images/PleaseRepeatLouder.jpg', 'PleaseRepeatLouder.jpg')
|
11 |
#torch.hub.download_url_to_file('https://github.com/AaronCWacker/Yggdrasil/blob/main/images/ProhibitedInWhiteHouse.JPG', 'ProhibitedInWhiteHouse.JPG')
|
12 |
|
13 |
-
torch.hub.download_url_to_file('https://
|
14 |
-
torch.hub.download_url_to_file('https://github.com/JaidedAI/EasyOCR/raw/master/examples/english.png', 'COVID.png')
|
15 |
-
torch.hub.download_url_to_file('https://github.com/JaidedAI/EasyOCR/raw/master/examples/chinese.jpg', 'chinese.jpg')
|
16 |
-
torch.hub.download_url_to_file('https://github.com/JaidedAI/EasyOCR/raw/master/examples/japanese.jpg', 'japanese.jpg')
|
17 |
-
torch.hub.download_url_to_file('https://i.imgur.com/mwQFd7G.jpeg', 'Hindi.jpeg')
|
18 |
|
19 |
def draw_boxes(image, bounds, color='yellow', width=2):
|
20 |
draw = ImageDraw.Draw(image)
|
@@ -34,7 +30,7 @@ def inference(img, lang):
|
|
34 |
article = "<p style='text-align: center'></p>"
|
35 |
|
36 |
examples = [
|
37 |
-
['20-Books.jpg',['en']],['
|
38 |
|
39 |
css = ".output_image, .input_image {height: 40rem !important; width: 100% !important;}"
|
40 |
choices = [
|
|
|
10 |
#torch.hub.download_url_to_file('https://github.com/AaronCWacker/Yggdrasil/blob/main/images/PleaseRepeatLouder.jpg', 'PleaseRepeatLouder.jpg')
|
11 |
#torch.hub.download_url_to_file('https://github.com/AaronCWacker/Yggdrasil/blob/main/images/ProhibitedInWhiteHouse.JPG', 'ProhibitedInWhiteHouse.JPG')
|
12 |
|
13 |
+
torch.hub.download_url_to_file('https://app.konfuzio.com/page/show-image/3111249/','invoice.png')
|
|
|
|
|
|
|
|
|
14 |
|
15 |
def draw_boxes(image, bounds, color='yellow', width=2):
|
16 |
draw = ImageDraw.Draw(image)
|
|
|
30 |
article = "<p style='text-align: center'></p>"
|
31 |
|
32 |
examples = [
|
33 |
+
['20-Books.jpg',['en']],['invoice.png',['en']]]
|
34 |
|
35 |
css = ".output_image, .input_image {height: 40rem !important; width: 100% !important;}"
|
36 |
choices = [
|