Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -173,3 +173,20 @@ with tab3:
|
|
173 |
styled = binary_df.style.applymap(color_binary, subset=matching_cols)
|
174 |
st.dataframe(styled)
|
175 |
st.download_button("Download CSV", binary_df.to_csv(index=False), "ef_binary_labels.csv")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
styled = binary_df.style.applymap(color_binary, subset=matching_cols)
|
174 |
st.dataframe(styled)
|
175 |
st.download_button("Download CSV", binary_df.to_csv(index=False), "ef_binary_labels.csv")
|
176 |
+
|
177 |
+
# Convert to bitstrings and strings
|
178 |
+
binary_strings = []
|
179 |
+
decoded_strings = []
|
180 |
+
for _, row in binary_part.iterrows():
|
181 |
+
bitlist = row.values.tolist()
|
182 |
+
bitstring = ''.join(str(b) for b in bitlist)
|
183 |
+
binary_strings.append(bitstring)
|
184 |
+
decoded_strings.append(binary_labels_to_string(bitlist))
|
185 |
+
|
186 |
+
st.subheader("Binary as Bitstrings")
|
187 |
+
for i, b in enumerate(binary_strings):
|
188 |
+
st.code(b)
|
189 |
+
|
190 |
+
st.subheader("Decoded ASCII Strings")
|
191 |
+
for i, s in enumerate(decoded_strings):
|
192 |
+
st.write(s)
|