abhi1280 commited on
Commit
1f7d355
1 Parent(s): 56e44ab

Add application file

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ import qrcode
4
+ import random
5
+
6
+ def texttoqr(text):
7
+ qr_img = qrcode.make(text)
8
+ count = random.randint(1, 99999999999999999999999999999999999999)
9
+ if (count > 0):
10
+ name = 'qrfile/'+"qr-img"+ str(count) +".jpg"
11
+ qr_img.save(name)
12
+ return name
13
+
14
+
15
+ demo = gr.Interface(texttoqr, gr.Textbox(), "image")
16
+ demo.launch(share=True)