Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,13 +11,13 @@ df.drop(columns=["id"], inplace=True)
|
|
11 |
|
12 |
def plot(df):
|
13 |
plots = []
|
14 |
-
plt.scatter(df.measurement_13, df.measurement_15, c = df.
|
15 |
plt.savefig("scatter.png")
|
16 |
-
plt.scatter(df.measurement_10, df.measurement_15, c = df.
|
17 |
plt.savefig("scatter_2.png")
|
18 |
-
plt.scatter(df.measurement_14, df.measurement_15, c = df.
|
19 |
plt.savefig("scatter_3.png")
|
20 |
-
plt.scatter(df.measurement_16, df.measurement_15, c = df.
|
21 |
plt.savefig("scatter_4.png")
|
22 |
df['failure'].value_counts().plot(kind='bar')
|
23 |
plt.savefig("bar.png")
|
@@ -29,7 +29,7 @@ def plot(df):
|
|
29 |
plt.savefig("swarmplot.png")
|
30 |
sns.heatmap(df.select_dtypes(include="number").corr())
|
31 |
plt.savefig("corr.png")
|
32 |
-
plots = ["corr.png","scatter.png", "bar.png", "loading_dist.png", "attribute_3.png", "swarmplot.png"]
|
33 |
return plots
|
34 |
|
35 |
inputs = [gr.Dataframe(label="Supersoaker Production Data")]
|
|
|
11 |
|
12 |
def plot(df):
|
13 |
plots = []
|
14 |
+
plt.scatter(df.measurement_13, df.measurement_15, c = df.failure, alpha=0.5)
|
15 |
plt.savefig("scatter.png")
|
16 |
+
plt.scatter(df.measurement_10, df.measurement_15, c = df.failure, alpha=0.5)
|
17 |
plt.savefig("scatter_2.png")
|
18 |
+
plt.scatter(df.measurement_14, df.measurement_15, c = df.failure, alpha=0.5)
|
19 |
plt.savefig("scatter_3.png")
|
20 |
+
plt.scatter(df.measurement_16, df.measurement_15, c = df.failure, alpha=0.5)
|
21 |
plt.savefig("scatter_4.png")
|
22 |
df['failure'].value_counts().plot(kind='bar')
|
23 |
plt.savefig("bar.png")
|
|
|
29 |
plt.savefig("swarmplot.png")
|
30 |
sns.heatmap(df.select_dtypes(include="number").corr())
|
31 |
plt.savefig("corr.png")
|
32 |
+
plots = ["corr.png","scatter.png", "scatter_2.png", "scatter_3.png", "scatter_4.png", "bar.png", "loading_dist.png", "attribute_3.png", "swarmplot.png"]
|
33 |
return plots
|
34 |
|
35 |
inputs = [gr.Dataframe(label="Supersoaker Production Data")]
|