Update app.py
Browse filesRemove image examples
app.py
CHANGED
|
@@ -100,14 +100,9 @@ This application extracts key information (**NIK, Nama, Tempat Lahir, Tanggal La
|
|
| 100 |
You can upload one or multiple KTP images at once. The results will be displayed in a table below.
|
| 101 |
|
| 102 |
*Powered by the `emisilab/model-ocr-ktp-v1` model from Hugging Face.*
|
| 103 |
-
\n*Last Updated: Sunday, August 31, 2025 at 12:
|
| 104 |
"""
|
| 105 |
|
| 106 |
-
example_images = [
|
| 107 |
-
"https://huggingface.co/emisilab/model-ocr-ktp-v1/resolve/main/ocr-ktp-1.jpg",
|
| 108 |
-
"https://huggingface.co/emisilab/model-ocr-ktp-v1/resolve/main/ocr-ktp-2.jpg"
|
| 109 |
-
]
|
| 110 |
-
|
| 111 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 112 |
gr.Markdown(app_description)
|
| 113 |
|
|
@@ -117,14 +112,9 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 117 |
label="Upload KTP Images",
|
| 118 |
file_count="multiple",
|
| 119 |
file_types=["image"],
|
| 120 |
-
type="filepath"
|
| 121 |
)
|
| 122 |
extract_button = gr.Button("Extract KTP Data", variant="primary")
|
| 123 |
-
gr.Examples(
|
| 124 |
-
examples=example_images,
|
| 125 |
-
inputs=image_input,
|
| 126 |
-
label="Click an example to try"
|
| 127 |
-
)
|
| 128 |
|
| 129 |
with gr.Column(scale=2):
|
| 130 |
output_dataframe = gr.DataFrame(
|
|
|
|
| 100 |
You can upload one or multiple KTP images at once. The results will be displayed in a table below.
|
| 101 |
|
| 102 |
*Powered by the `emisilab/model-ocr-ktp-v1` model from Hugging Face.*
|
| 103 |
+
\n*Last Updated: Sunday, August 31, 2025 at 12:17 PM WIB (Cilegon)*
|
| 104 |
"""
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 107 |
gr.Markdown(app_description)
|
| 108 |
|
|
|
|
| 112 |
label="Upload KTP Images",
|
| 113 |
file_count="multiple",
|
| 114 |
file_types=["image"],
|
| 115 |
+
type="filepath"
|
| 116 |
)
|
| 117 |
extract_button = gr.Button("Extract KTP Data", variant="primary")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
with gr.Column(scale=2):
|
| 120 |
output_dataframe = gr.DataFrame(
|