Spaces:
Runtime error
Runtime error
File size: 1,192 Bytes
c112ea6 03df0fa c112ea6 03df0fa c112ea6 03df0fa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
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()
|