sonobit commited on
Commit
ae65a7f
·
1 Parent(s): 086f182

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -6
app.py CHANGED
@@ -1,9 +1,17 @@
1
  import gradio as gr
2
- aList = []
3
- def add2List(num):
4
- num = int(num)
5
- aList.append(num)
6
- return aList
 
 
 
 
 
 
 
 
7
 
8
- iface = gr.Interface(fn=add2List, inputs="text", outputs="text")
9
  iface.launch()
 
1
  import gradio as gr
2
+ import random as r
3
+ def add2List(num,start,end):
4
+ aList = []
5
+ bList = []
6
+ num = int(num)
7
+ start = int(start)
8
+ end = int(end)
9
+ for i in range(num):
10
+ rand=r.randint(1,99)
11
+ aList.append(rand)
12
+ bList.append(rand)
13
+ bList.sort()
14
+ return aList, bList
15
 
16
+ iface = gr.Interface(fn=add2List, inputs=["text","text","text"], outputs=["text","text"])
17
  iface.launch()