Spaces:
Running
Running
citation text added
Browse files
app.py
CHANGED
|
@@ -65,6 +65,28 @@ import cv2
|
|
| 65 |
from PIL import ImageFont, ImageDraw, Image
|
| 66 |
font = ImageFont.truetype("kalpurush.ttf", 60)
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
#import more
|
| 69 |
import tensorflow as tf
|
| 70 |
from object_detection.utils import config_util
|
|
@@ -573,6 +595,6 @@ import gradio as gr
|
|
| 573 |
HF_TOKEN = os.getenv("SECRET_TOKEN")
|
| 574 |
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "word-flag-data")
|
| 575 |
|
| 576 |
-
demo = gr.Interface(fn=model_predict, inputs= "paint", outputs=["text","image"],
|
| 577 |
-
description="Reduce pen ink size from Pen Icon(๐๏ธ) for better results!",allow_flagging="auto",flagging_callback=hf_writer)
|
| 578 |
demo.launch()
|
|
|
|
| 65 |
from PIL import ImageFont, ImageDraw, Image
|
| 66 |
font = ImageFont.truetype("kalpurush.ttf", 60)
|
| 67 |
|
| 68 |
+
citation_text = """<div>
|
| 69 |
+
<br><p>This is a demo space for the paper: <i>Improving Character Recognition in Bangla Handwritten Words: A Two-Stage Single Shot Detector Approach</i>.</p>
|
| 70 |
+
<p>Direct Link to the Paper:
|
| 71 |
+
<a href='https://ieeexplore.ieee.org/document/10499463' style='text-decoration: none; color: blue;'>https://ieeexplore.ieee.org/document/10499463</a></p>
|
| 72 |
+
<p>ResearchGate Link to the Paper:
|
| 73 |
+
<a href='https://www.researchgate.net/publication/380009779_Improving_Character_Recognition_in_Bangla_Handwritten_Words_A_Two-Stage_Single_Shot_Detector_Approach' style='text-decoration: none; color: blue;'>https://bit.ly/ResearchGatePaperLink</a></p>
|
| 74 |
+
<p>Please cite this paper with BibTeX as follows:</p>
|
| 75 |
+
</div>
|
| 76 |
+
<div style='background-color: #f0f0f0; padding: 10px; border-radius: 5px;'>
|
| 77 |
+
@INPROCEEDINGS{10499463,<br>
|
| 78 |
+
author={Pal, Avi and Hasan, Md. Sajid and Masudul Ahsan, Sk. Md.},<br>
|
| 79 |
+
booktitle={2024 International Conference on Advances in Computing, Communication, Electrical, and Smart Systems (iCACCESS)}, <br>
|
| 80 |
+
title={Improving Character Recognition in Bangla Handwritten Words: A Two-Stage Single Shot Detector Approach}, <br>
|
| 81 |
+
year={2024},<br>
|
| 82 |
+
volume={},<br>
|
| 83 |
+
number={},<br>
|
| 84 |
+
pages={1-6},<br>
|
| 85 |
+
keywords={YOLO;Deep learning;Image segmentation;Handwriting recognition;Image recognition;Optical character recognition;Transfer learning;Machine learning;Image Processing and Computer Vision;Optical character recognition;Tensorflow;MobileNetV2;Convolutional Neural Network;Single Shot Detector},<br>
|
| 86 |
+
doi={10.1109/iCACCESS61735.2024.10499463}}<br>
|
| 87 |
+
</div>
|
| 88 |
+
"""
|
| 89 |
+
|
| 90 |
#import more
|
| 91 |
import tensorflow as tf
|
| 92 |
from object_detection.utils import config_util
|
|
|
|
| 595 |
HF_TOKEN = os.getenv("SECRET_TOKEN")
|
| 596 |
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "word-flag-data")
|
| 597 |
|
| 598 |
+
demo = gr.Interface(fn=model_predict, inputs= "paint", outputs=["text","image"],title= "Bangla Word OCR",
|
| 599 |
+
description="Reduce pen ink size from Pen Icon(๐๏ธ) for better results!",article=citation_text,allow_flagging="auto",flagging_callback=hf_writer)
|
| 600 |
demo.launch()
|