File size: 1,561 Bytes
769938f
 
cd361a6
 
 
769938f
cd361a6
 
769938f
cd361a6
 
769938f
cd361a6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
769938f
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
37
38
39
40
41
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()