Download app.py from DeimosJS3/HepaScan: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/spaces/DeimosJS3/HepaScan/resolve/main/app.py
- Command line
-
hf download hf://spaces/DeimosJS3/HepaScan/app.py
-
curl -L -o app.py https://huggingface.co/spaces/DeimosJS3/HepaScan/resolve/main/app.py
584 Bytes
| import gradio as gr | |
| from statistics import mean, harmonic_mean, geometric_mean | |
| def calcular(a, b, c): | |
| numeros = [float(a), float(b), float(c)] | |
| promedio = mean(numeros) | |
| geometrica = geometric_mean(numeros) | |
| armonica = harmonic_mean(numeros) | |
| return f"Promedio: {promedio}\nGeométrica: {geometrica}\nArmónica: {armonica}" | |
| interfaz = gr.Interface( | |
| fn=calcular, | |
| inputs=["number", "number", "number"], | |
| outputs="text", | |
| title="Calculadora de medias", | |
| description="Envía tres números y obtén 3 resultados." | |
| ) | |
| interfaz.launch() | |