Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
import random as r
|
3 |
-
def add2List(num):
|
4 |
aList = []
|
5 |
bList = []
|
6 |
num = int(num)
|
|
|
|
|
7 |
for i in range(num):
|
8 |
-
rand=r.randint(
|
9 |
aList.append(rand)
|
10 |
bList.append(rand)
|
11 |
bList.sort()
|
12 |
return aList, bList
|
13 |
|
14 |
-
iface = gr.Interface(fn=add2List, inputs="text", outputs=["text","text"])
|
15 |
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(start,end)
|
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()
|