QR-Read-Mod / app.py
Omnibus's picture
Create app.py
d3f340f
raw
history blame
421 Bytes
import gradio as gr
import zxingcpp
def decode(im):
img = cv2.imread(f'{im}')
results = zxingcpp.read_barcodes(img)
print (results[0].text)
return results[0].text
with gr.Blocks() as app:
in_im = gr.Image("QR Image to Decode")
dec_btn = gr.Button("Decode QR")
text_out = gr.Textbox("Decoded Text")
dec_btn.click(decode,in_im,text_out)
app.queue(concurrency_count=10).launch()