eogreen commited on
Commit
ece39d2
1 Parent(s): dc4d0c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -6
app.py CHANGED
@@ -45,13 +45,36 @@ textbox = gr.Textbox(label='Command')
45
  # value="aws")
46
 
47
  # Create Gradio interface
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  # For the inputs parameter of Interface provide [textbox,company] with outputs parameter of Interface provide prediction
49
- demo = gr.Interface(fn=dprocess,
50
- inputs=[textbox],
51
- outputs="text",
52
- title="operand",
53
- description="Data Workbench CLI",
54
- theme=gr.themes.Soft())
55
 
56
  demo.queue()
57
  demo.launch()
 
45
  # value="aws")
46
 
47
  # Create Gradio interface
48
+ # Create Gradio interface with tabs
49
+ with gr.Blocks() as demo:
50
+ with gr.Tab("Tab A"):
51
+ gr.Markdown("## This is Tab A")
52
+ textbox_a = gr.Textbox(label='Command A')
53
+ output_a = gr.Textbox(label='Output A')
54
+ button_a = gr.Button("Submit A")
55
+ button_a.click(dprocess, inputs=[textbox_a], outputs=output_a)
56
+
57
+ with gr.Tab("Tab B"):
58
+ gr.Markdown("## This is Tab B")
59
+ textbox_b = gr.Textbox(label='Command B')
60
+ output_b = gr.Textbox(label='Output B')
61
+ button_b = gr.Button("Submit B")
62
+ button_b.click(dprocess, inputs=[textbox_b], outputs=output_b)
63
+
64
+ with gr.Tab("Tab C"):
65
+ gr.Markdown("## This is Tab C")
66
+ textbox_c = gr.Textbox(label='Command C')
67
+ output_c = gr.Textbox(label='Output C')
68
+ button_c = gr.Button("Submit C")
69
+ button_c.click(dprocess, inputs=[textbox_c], outputs=output_c)
70
+
71
  # For the inputs parameter of Interface provide [textbox,company] with outputs parameter of Interface provide prediction
72
+ # demo = gr.Interface(fn=dprocess,
73
+ # inputs=[textbox],
74
+ # outputs="text",
75
+ # title="operand",
76
+ # description="Data Workbench CLI",
77
+ # theme=gr.themes.Soft())
78
 
79
  demo.queue()
80
  demo.launch()