Spaces:
Runtime error
Runtime error
Commit ·
a6f6ba9
1
Parent(s): 8b36f85
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 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)
|
|
@@ -11,13 +11,12 @@ def add2List(num,startRand,endRand):
|
|
| 11 |
for i in range (num):
|
| 12 |
#r = rd.randint(1,100)
|
| 13 |
r = rd.randint (startRand,endRand)
|
| 14 |
-
|
| 15 |
-
|
| 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 |
-
|
| 23 |
iface.launch()
|
|
|
|
| 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)
|
|
|
|
| 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()
|