Spaces:
Runtime error
Runtime error
Download app.py from decodingdatascience/arraygenerator: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/spaces/decodingdatascience/arraygenerator/resolve/main/app.py
- Command line
-
hf download hf://spaces/decodingdatascience/arraygenerator/app.py
-
curl -L -o app.py https://huggingface.co/spaces/decodingdatascience/arraygenerator/resolve/main/app.py
388 Bytes
| import numpy as np | |
| import gradio as gr | |
| def create_array(shape): | |
| shape = tuple(map(int, shape.split(','))) | |
| arr= np.random.randint(0,100, size=shape) | |
| return arr | |
| x=gr.Interface( | |
| fn=create_array, | |
| inputs="text", | |
| outputs="text", | |
| title= "Random Array Generator", | |
| description= "Enter the shape is the format comma-separated integers (e.g 2,3)" | |
| ) | |
| x.launch() |