File size: 1,672 Bytes
2ec702c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
42
43
44
45
46
47
48
49
50
import gradio as gr
from demo import * 



article = """
<p style='text-align: center'>
    <a href='https://github.com/deep-matter/Nano-AutoGrad' target='_blank'>Github Repo Nano-AutoGrad</a>
</p>
"""

iface_webcam = gr.Interface(
    Optimization_training_progress_realtime,
    inputs=[
        gr.Radio(["Sparsity"], label="Task"),
        gr.Slider(minimum=1, maximum=100, label="Number of Epochs"),
        gr.Slider(minimum=0.01, maximum=1.0, label="Learning Rate"),
        gr.Number(label="Number of Layers"),
        gr.Number(label="Values for Weights")
        # gr.inputs.Slider(minimum=6, maximum=18, step=6, default=12),  # Leaving manual fps out for now
    ],
    outputs=[gr.Plot(),gr.Video(),gr.Video()],
    title="Optimization Training Progress",
    description="Real-time visualization of training progress",
    article=article,
    allow_flagging=False,
)

iface_file = gr.Interface(
    Optimization_training_progress_realtime,
    inputs=[
        gr.Radio(["Classification"], label="Task"),
        gr.Slider(minimum=1, maximum=100, label="Number of Epochs"),
        gr.Slider(minimum=0.01, maximum=1.0, label="Learning Rate"),
        gr.Number(label="Number of Layers"),
        gr.Number(label="Values for Weights")
    ],
    outputs=[gr.Plot(),gr.Video(),gr.Video()],
    title="Optimization Training Progress",
    description="Real-time visualization of training progress",
    article=article,
    allow_flagging=False,
)

if __name__ == '__main__':
    gr.TabbedInterface(
        interface_list=[iface_file, iface_webcam],
        tab_names=["Classification Task", "Sparsity Task"]
        
    ).launch(enable_queue=True,share=True)