Spaces:
Runtime error
Runtime error
Commit
·
45cdb18
1
Parent(s):
a1a6296
Upload app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
2 |
import torch
|
3 |
from datasets import load_dataset, ClassLabel
|
4 |
import os
|
@@ -7,11 +10,6 @@ import pytesseract
|
|
7 |
import numpy as np
|
8 |
from PIL import ImageDraw, ImageFont
|
9 |
|
10 |
-
os.system('pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu')
|
11 |
-
os.system('sudo apt-get install tesseract-ocr')
|
12 |
-
os.system('pip install -q pytesseract')
|
13 |
-
print("pytesseract:",pytesseract.__version__)
|
14 |
-
|
15 |
examples = [['./examples/example1.png'],['./examples/example2.png'],['./examples/example3.png']]
|
16 |
dataset = load_dataset("nielsr/cord-layoutlmv3")['train']
|
17 |
|
|
|
1 |
import gradio as gr
|
2 |
+
os.system('pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu')
|
3 |
+
os.system('sudo apt-get install tesseract-ocr')
|
4 |
+
os.system('pip install -q pytesseract')
|
5 |
import torch
|
6 |
from datasets import load_dataset, ClassLabel
|
7 |
import os
|
|
|
10 |
import numpy as np
|
11 |
from PIL import ImageDraw, ImageFont
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
examples = [['./examples/example1.png'],['./examples/example2.png'],['./examples/example3.png']]
|
14 |
dataset = load_dataset("nielsr/cord-layoutlmv3")['train']
|
15 |
|