Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,17 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
-
def add2List(num):
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|