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