harikrishnad1997 commited on
Commit
157b60b
·
verified ·
1 Parent(s): 2bd2954

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -30,22 +30,21 @@ def plot_scatter(file_contents, x_axis, y_axis):
30
  plt.ylabel(y_axis)
31
  return plt
32
 
33
- # Create the Gradio interface for histogram
34
  iface_histogram = gr.Interface(
35
  fn=plot_histogram,
36
- inputs=[gr.inputs.File(label="Upload CSV file"), "text"],
37
  outputs="plot",
38
  title="Histogram Plotter",
39
- description="Upload a CSV file and select a column to plot its histogram."
40
  )
41
 
42
  # Create the Gradio interface for scatter plot
43
  iface_scatter = gr.Interface(
44
  fn=plot_scatter,
45
- inputs=[gr.inputs.File(label="Upload CSV file"), "text", "text"],
46
  outputs="plot",
47
  title="Scatter Plotter",
48
- description="Upload a CSV file and select X and Y columns to plot a scatter plot."
49
  )
50
 
51
  # Launch the Gradio interfaces
 
30
  plt.ylabel(y_axis)
31
  return plt
32
 
 
33
  iface_histogram = gr.Interface(
34
  fn=plot_histogram,
35
+ inputs=[gr.components.File(label="Upload CSV file"), gr.components.Text()],
36
  outputs="plot",
37
  title="Histogram Plotter",
38
+ description="Upload a CSV file and select a column to plot its histogram.",
39
  )
40
 
41
  # Create the Gradio interface for scatter plot
42
  iface_scatter = gr.Interface(
43
  fn=plot_scatter,
44
+ inputs=[gr.components.File(label="Upload CSV file"), gr.components.Text(), gr.components.Text()],
45
  outputs="plot",
46
  title="Scatter Plotter",
47
+ description="Upload a CSV file and select X and Y columns to plot a scatter plot.",
48
  )
49
 
50
  # Launch the Gradio interfaces