Commit
·
36b2c22
1
Parent(s):
80eb5e5
Upload 2 files
Browse files- app.py +16 -0
- requirements.txt +9 -0
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio
|
2 |
+
import cv2
|
3 |
+
import os
|
4 |
+
from ktp_reader import process_image
|
5 |
+
import logging
|
6 |
+
logging.getLogger().setLevel(logging.ERROR)
|
7 |
+
|
8 |
+
iface = gradio.Interface(
|
9 |
+
fn=process_image,
|
10 |
+
inputs='image',
|
11 |
+
outputs='text',
|
12 |
+
title='Indonesian ID Data Extraction',
|
13 |
+
description="This space includes a solution to extract Indonesian ID data using Tesseract, PaddleOCR, OpenCV, and TheFuzz.",
|
14 |
+
examples=["id.jpg"])
|
15 |
+
|
16 |
+
iface.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
fastapi==0.100.0
|
2 |
+
opencv-python==4.6.0.66
|
3 |
+
paddleocr==2.6.1.3
|
4 |
+
paddlepaddle==2.4.1
|
5 |
+
pydantic==1.10.5
|
6 |
+
pytesseract==0.3.10
|
7 |
+
python-Levenshtein==0.20.9
|
8 |
+
thefuzz==0.19.0
|
9 |
+
uvicorn==0.23.1
|