Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
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.
|
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
|