os1187 commited on
Commit
426e88c
·
1 Parent(s): 02368c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -4
app.py CHANGED
@@ -55,9 +55,23 @@ def plot_usage_volume(inputs):
55
 
56
 
57
 
58
- # Create input components for the Gradio app
59
- system1 = gr.inputs.Textbox(label="System 1 Name", default="System1")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  title = "System Rollout Usage Volume Plot"
61
  description = "Enter the rollout parameters for three different systems and see the resulting usage volume plot."
62
-
63
- gr.Interface(plot_usage_volume, inputs, output, title=title, description=description).launch()
 
55
 
56
 
57
 
58
+ # Define the input components for the Gradio app
59
+ inputs = {
60
+ "system1": gr.inputs.Textbox(label="System 1 Name", default="System1"),
61
+ "users1": gr.inputs.Slider(minimum=0, maximum=1000, default=500, label="System 1 Users"),
62
+ "timeline1": gr.inputs.Slider(minimum=1, maximum=12, default=6, label="System 1 Rollout Timeline (Months)"),
63
+ "system2": gr.inputs.Textbox(label="System 2 Name", default="System2"),
64
+ "users2": gr.inputs.Slider(minimum=0, maximum=1000, default=500, label="System 2 Users"),
65
+ "timeline2": gr.inputs.Slider(minimum=1, maximum=12, default=6, label="System 2 Rollout Timeline (Months)"),
66
+ "system3": gr.inputs.Textbox(label="System 3 Name", default="System3"),
67
+ "users3": gr.inputs.Slider(minimum=0, maximum=1000, default=500, label="System 3 Users"),
68
+ "timeline3": gr.inputs.Slider(minimum=1, maximum=12, default=6, label="System 3 Rollout Timeline (Months)")
69
+ }
70
+
71
+ # Define the output component for the Gradio app
72
+ output = gr.outputs.Image()
73
+
74
+ # Define the Gradio interface and launch it
75
  title = "System Rollout Usage Volume Plot"
76
  description = "Enter the rollout parameters for three different systems and see the resulting usage volume plot."
77
+ gr.Interface(plot_usage_volume, inputs, output, title=title, description=description).launch()