deep-matter commited on
Commit
2d43028
·
1 Parent(s): e2a388a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -48
app.py CHANGED
@@ -1,50 +1,9 @@
1
- import gradio as gr
2
- from demo import *
3
 
 
 
4
 
5
-
6
- article = """
7
- <p style='text-align: center'>
8
- <a href='https://github.com/deep-matter/Nano-AutoGrad' target='_blank'>Github Repo Nano-AutoGrad</a>
9
- </p>
10
- """
11
-
12
- iface_webcam = gr.Interface(
13
- Optimization_training_progress_realtime,
14
- inputs=[
15
- gr.Radio(["Sparsity"], label="Task"),
16
- gr.Slider(minimum=1, maximum=100, label="Number of Epochs"),
17
- gr.Slider(minimum=0.01, maximum=1.0, label="Learning Rate"),
18
- gr.Number(label="Number of Layers"),
19
- gr.Number(label="Values for Weights")
20
- # gr.inputs.Slider(minimum=6, maximum=18, step=6, default=12), # Leaving manual fps out for now
21
- ],
22
- outputs=[gr.Plot(),gr.Video(),gr.Video()],
23
- title="Optimization Training Progress",
24
- description="Real-time visualization of training progress",
25
- article=article,
26
- allow_flagging=False,
27
- )
28
-
29
- iface_file = gr.Interface(
30
- Optimization_training_progress_realtime,
31
- inputs=[
32
- gr.Radio(["Classification"], label="Task"),
33
- gr.Slider(minimum=1, maximum=100, label="Number of Epochs"),
34
- gr.Slider(minimum=0.01, maximum=1.0, label="Learning Rate"),
35
- gr.Number(label="Number of Layers"),
36
- gr.Number(label="Values for Weights")
37
- ],
38
- outputs=[gr.Plot(),gr.Video(),gr.Video()],
39
- title="Optimization Training Progress",
40
- description="Real-time visualization of training progress",
41
- article=article,
42
- allow_flagging=False,
43
- )
44
-
45
- if __name__ == '__main__':
46
- gr.TabbedInterface(
47
- interface_list=[iface_file, iface_webcam],
48
- tab_names=["Classification Task", "Sparsity Task"]
49
-
50
- ).launch(enable_queue=True,share=False)
 
1
+ import zipfile
 
2
 
3
+ # Specify the path to the ZIP file
4
+ zip_path = 'app.zip'
5
 
6
+ # Open the ZIP file
7
+ with zipfile.ZipFile(zip_path, 'r') as zip_ref:
8
+ # Extract all files and directories in the ZIP file
9
+ zip_ref.extractall('.')