File size: 602 Bytes
2f63626
 
 
 
 
 
 
 
 
a4ba584
5ec6795
 
 
 
 
 
2f63626
 
 
 
 
5ec6795
2f63626
5ec6795
40b6dea
 
 
5ec6795
97325b8
 
 
 
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
import gradio as gr



import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt


def f1(ignore):
    fig = plt.figure(figsize=(6,5))
    plt.axline((0,0),slope=1,color="darkgray")
    plt.xlabel("Vowel length (ms)")
    plt.ylabel("Consonant length (ms)")
    return(fig)
    #return "a box"

bl = gr.Blocks()
with bl:
    btn1 = gr.Button(value="The random prosody button")

    pl1 = gr.Plot()
    
    btn1.click(f1, [btn1], pl1)

    output_box = gr.Textbox(label="Forced alignment output")

    #btn1.click(f1, [output_box], output_box)


if __name__ == "__main__":
    bl.launch()