os1187 commited on
Commit
ff0096b
·
1 Parent(s): ebd53c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,6 +3,7 @@ import numpy as np
3
  import plotly
4
  import plotly.express as px
5
  import gradio as gr
 
6
 
7
  def plot_usage_volume(system1, users1, timeline1, system2, users2, timeline2, system3, users3, timeline3):
8
  # Create empty dataframe to hold usage data
@@ -25,7 +26,7 @@ def plot_usage_volume(system1, users1, timeline1, system2, users2, timeline2, sy
25
  # Create a line plot of the usage volume for each system
26
  fig = px.line(data, x="Month", y="Usage", color="System", title="System Rollout Usage Volume Plot")
27
 
28
- # Return the plot as a Plotly figure object
29
  return fig
30
 
31
  # Define the input components
@@ -42,11 +43,10 @@ inputs = [
42
  ]
43
 
44
  # Define the output component
45
- output = gr.outputs.Plot(label="Usage Volume Plot")
46
 
47
  # Create the interface
48
  iface = gr.Interface(fn=plot_usage_volume, inputs=inputs, outputs=output, title="System Rollout Usage Volume Plot")
49
 
50
  # Launch the interface
51
  iface.launch()
52
-
 
3
  import plotly
4
  import plotly.express as px
5
  import gradio as gr
6
+ import json
7
 
8
  def plot_usage_volume(system1, users1, timeline1, system2, users2, timeline2, system3, users3, timeline3):
9
  # Create empty dataframe to hold usage data
 
26
  # Create a line plot of the usage volume for each system
27
  fig = px.line(data, x="Month", y="Usage", color="System", title="System Rollout Usage Volume Plot")
28
 
29
+ # Return the plot as a Gradio output
30
  return fig
31
 
32
  # Define the input components
 
43
  ]
44
 
45
  # Define the output component
46
+ output = gr.outputs.Graph(label="Usage Volume Plot")
47
 
48
  # Create the interface
49
  iface = gr.Interface(fn=plot_usage_volume, inputs=inputs, outputs=output, title="System Rollout Usage Volume Plot")
50
 
51
  # Launch the interface
52
  iface.launch()