import gradio as gr import random as r aList=[] def add2List(num): num=int(num) for i in range(num): soom=r.randint(1,99) aList.append(soom) return aList iface = gr.Interface(fn=add2List, inputs="text", outputs="text") iface.launch()