Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import random as rd | |
| def add2List(num,startRand,endRand): | |
| aList = [] | |
| bList = [] | |
| if num =="": | |
| num=10 | |
| if startRand=="": | |
| startRand=1 | |
| if endRand=="": | |
| endRand=100 | |
| num = int(num) | |
| startRand = int(startRand) | |
| endRand = int(endRand) | |
| for i in range(num): | |
| #r = rd.randint(1,100) | |
| r = rd.randint(startRand,endRand) | |
| aList.append(r) | |
| bList.append(r) | |
| bList.sort() | |
| MAX = max(aList) | |
| MIN = min(aList) | |
| return aList,bList,MAX,MIN | |
| iface = gr.Interface(fn=add2List, inputs=["text","text","text"], outputs=["text","text","text","text"]) | |
| iface.launch() |