Commit
·
062bd85
1
Parent(s):
9bbc2d5
Need new libs to be considered in the app
Browse files
app.py
CHANGED
@@ -80,14 +80,16 @@ if st.button('Generate Dataset'): # Generate the dataset
|
|
80 |
return array.flatten()
|
81 |
|
82 |
# apply the flatten_array function to each array in the list and create a list of flattened arrays
|
83 |
-
flattened_arrays = [flatten_array(a) for a in box_arrays]
|
84 |
|
85 |
# Perform the TSNE Reduction
|
86 |
x, y, title, embedding = TSNE_reduction(flattened_arrays)
|
87 |
-
|
88 |
plt.scatter(x, y)
|
89 |
plt.title(title)
|
90 |
-
plt.
|
|
|
|
|
91 |
|
92 |
class NumpyArrayEncoder(JSONEncoder):
|
93 |
def default(self, obj):
|
|
|
80 |
return array.flatten()
|
81 |
|
82 |
# apply the flatten_array function to each array in the list and create a list of flattened arrays
|
83 |
+
flattened_arrays = np.array([flatten_array(a) for a in box_arrays])
|
84 |
|
85 |
# Perform the TSNE Reduction
|
86 |
x, y, title, embedding = TSNE_reduction(flattened_arrays)
|
87 |
+
plt.figure(3)
|
88 |
plt.scatter(x, y)
|
89 |
plt.title(title)
|
90 |
+
plt.figure(3)
|
91 |
+
st.pyplot(plt.figure(3))
|
92 |
+
|
93 |
|
94 |
class NumpyArrayEncoder(JSONEncoder):
|
95 |
def default(self, obj):
|