File size: 427 Bytes
1f7d355
 
 
 
 
f4045ec
 
1f7d355
 
 
 
 
 
 
f4045ec
e717260
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

import gradio as gr
import qrcode
import random

def texttoqr(Input):
    qr_img = qrcode.make(Input)
    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(lines=1, placeholder="Enter Your Text Here..."), "image")     
demo.launch()