teste / app.py
Graziela's picture
teste
619734f
import gradio as gr
def esfera(raio,calculo):
if (calculo=="perimetro"):
return 2*raio*3.14
if (calculo=="area"):
return 3.14*raio**2
iface = gr.Interface(fn=esfera,
inputs=[gr.Slider(1, 20,1),
gr.Dropdown(["perimetro", "area"])], outputs="number")
iface.launch(debug=True, share=True)