packages
Browse files- app.py +6 -5
- packages.txt +1 -0
app.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
-
os.system('chmod 777 /tmp')
|
| 4 |
-
os.system('apt-get update -y')
|
| 5 |
-
os.system('apt-get install tesseract-ocr -y')
|
| 6 |
-
os.system('pip install -q pytesseract')
|
| 7 |
|
| 8 |
from base64 import b64decode, b64encode
|
| 9 |
from io import BytesIO
|
|
@@ -15,7 +15,8 @@ from PIL import Image
|
|
| 15 |
from transformers import pipeline
|
| 16 |
import streamlit as st
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
# description = """
|
| 20 |
# ## DocQA with 🤗 transformers, FastAPI, and Docker
|
| 21 |
# This app shows how to do Document Question Answering using
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
+
# os.system('chmod 777 /tmp')
|
| 4 |
+
# os.system('apt-get update -y')
|
| 5 |
+
# os.system('apt-get install tesseract-ocr -y')
|
| 6 |
+
# os.system('pip install -q pytesseract')
|
| 7 |
|
| 8 |
from base64 import b64decode, b64encode
|
| 9 |
from io import BytesIO
|
|
|
|
| 15 |
from transformers import pipeline
|
| 16 |
import streamlit as st
|
| 17 |
|
| 18 |
+
# pytesseract.pytesseract.tesseract_cmd = r’./Tesseract-OCR/tesseract.exe’
|
| 19 |
+
choices = os.popen('tesseract --list-langs').read().split('\n')[1:-1]
|
| 20 |
# description = """
|
| 21 |
# ## DocQA with 🤗 transformers, FastAPI, and Docker
|
| 22 |
# This app shows how to do Document Question Answering using
|
packages.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
tesseract-ocr-all
|