import gradio as gr from utils import * with gr.Blocks() as demo: with gr.Row(): with gr.Column(): lat = gr.Number(value=48.832408, label="Latitude", info="La latitude de votre élevage") lon = gr.Number(value=2.28619, label="Longitude", info="La longitude de votre élevage") address = gr.Textbox( label="Address", info="Dans le cas ou vous ne connaissez pas vos coordonnées GPS, rentrez votre adresse !") with gr.Column(): type_elevage = gr.CheckboxGroup(choices=[ "Bovin", "Ovin", "Caprin", "Porcin", "Volailles", "Equin" ], label="Type d'élevage", info="Quel est votre type d'élevage?") with gr.Column(): btn = gr.Button(value="Submit", size="sm") with gr.Tab("Map"): map = gr.HTML() with gr.Tab("Weather data"): fig = gr.Plot(label="Météo") demo.load(show_map, [lat, lon, address], [map, fig]) btn.click(show_map, [lat, lon, address], [map, fig]) demo.launch()