raktermaksudjai commited on
Commit
90b19bf
·
1 Parent(s): f89e417

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import random as rd
3
+
4
+ def add2List(num,startRand,endRand):
5
+ aList = []
6
+ bList = []
7
+ num = int(num)
8
+ startRand = int(startRand)
9
+ endRand = int(endRand)
10
+
11
+ for i in range (num):
12
+ #r = rd.randint(1,100)
13
+ r = rd.randint (startRand,endRand)
14
+ aList.append(r)
15
+ bList.append(r)
16
+ bList.sort()
17
+ MAX = max(aList)
18
+ MIN = min(aList)
19
+ return aList,bList,MAX,MIN
20
+
21
+ iface = gr.Interface(fn=add2List, inputs=["text","text","text"], outputs=["text","text","text","text"])
22
+ iface.launch()