QR_generator / text_to_qr.py
abhi1280's picture
Add application file
56e44ab
raw
history blame
389 Bytes
import gradio as gr
import qrcode
import random
def texttoqr(text):
qr_img = qrcode.make(text)
count = random.randint(1, 99999999999999999999999999999999999999)
if (count > 0):
name = 'qrfile/'+"qr-img"+ str(count) +".jpg"
qr_img.save(name)
return name
demo = gr.Interface(texttoqr, gr.Textbox(), "image")
demo.launch(share=True)