DavidD003 commited on
Commit
5bcd3fb
1 Parent(s): bc58955

Create new file

Browse files
Files changed (1) hide show
  1. app.py +35 -0
app.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ def update(name,fl):
3
+ return f"Welcome to Gradio, {name}!",fl
4
+
5
+ with gr.Blocks() as demo:
6
+ with gr.Tab("A - Visual Template Builder"):
7
+ gr.Markdown("Start typing below and then click **Run** to see the output.")
8
+ with gr.Row():
9
+ inp1 = gr.Textbox(placeholder="What is your name?")
10
+ out1 = gr.Textbox()
11
+ btn1 = gr.Button("Run")
12
+ fl1=gr.File(label="Assignments List"),
13
+ with gr.Tab("B - Scheduler"):
14
+ gr.Markdown("Start typing below and then click **Run** to see the output.2")
15
+ with gr.Row():
16
+ inp2 = gr.Textbox(placeholder="What is your name?2")
17
+ out2 = gr.Textbox()
18
+ btn2 = gr.Button("Run2")
19
+ with gr.Tab("B - Scheduler"):
20
+ gr.Markdown("Start tzyping below and then click **Run** to see the output.2")
21
+ with gr.Row():
22
+ inp2 = gr.Textbox(placeholder="What is your name?2")
23
+ out2 = gr.Textbox()
24
+ btn2 = gr.Button("Run2")
25
+ fl2=gr.File(label="Assignments List"),
26
+ with gr.Tab("C - Review"):
27
+ gr.Markdown("Start typing below and then click **Run** to see the output.2")
28
+ with gr.Row():
29
+ inp2 = gr.Textbox(placeholder="What is your name?2")
30
+ out2 = gr.Textbox()
31
+ btn2 = gr.Button("Run2")
32
+ btn1.click(fn=update, inputs=[inp1,fl1], outputs=[out2,fl2])
33
+ btn2.click(fn=update, inputs=inp2, outputs=out1)
34
+
35
+ demo.launch()