Spaces:
Sleeping
Sleeping
import gradio as gr | |
# Dummy-functies voor nu (we breiden die later uit) | |
def toon_opstelling(opstelling): | |
return f"Gekozen opstelling: {opstelling}" | |
def toon_tactiek(upload): | |
return f"Tactiekbestand ontvangen: {upload.name if upload else 'Geen bestand'}" | |
def verwerk_video(video): | |
return f"Video ontvangen: {video.name if video else 'Geen video'}" | |
# Interface layout | |
opstellingen = ["4-3-3", "3-5-2", "5-4-1", "4-2-3-1", "4-4-2"] | |
with gr.Blocks() as voetbalapp: | |
gr.Markdown("""# ⚽ Voetbal Tactiek App | |
Kies je opstelling, upload tactiek of analyseer spelsituaties!""") | |
with gr.Tab("Opstellingen"): | |
gr.Markdown("## Kies een opstelling") | |
keuze = gr.Dropdown(opstellingen, label="Opstelling kiezen") | |
output_opstelling = gr.Textbox(label="Resultaat") | |
knop_opstelling = gr.Button("Toon opstelling") | |
knop_opstelling.click(fn=toon_opstelling, inputs=keuze, outputs=output_opstelling) | |
with gr.Tab("Tactiek"): | |
gr.Markdown("## Upload een tactiekplaatje of PDF") | |
tactiek_file = gr.File(file_types=[".png", ".jpg", ".pdf"]) | |
tactiek_output = gr.Textbox() | |
gr.Button("Verwerk tactiek").click(fn=toon_tactiek, inputs=tactiek_file, outputs=tactiek_output) | |
with gr.Tab("Spelsituaties"): | |
gr.Markdown("## Upload een video van een spelsituatie") | |
video_upload = gr.File(file_types=[".mp4", ".mov"]) | |
video_output = gr.Textbox() | |
gr.Button("Verwerk video").click(fn=verwerk_video, inputs=video_upload, outputs=video_output) | |
voetbalapp.launch() | |