Spaces:
Runtime error
Runtime error
Mariusz Kossakowski
commited on
Commit
•
d3fc096
1
Parent(s):
b24d167
Add subset filtering in first 10 rows
Browse files
clarin_datasets/aspectemo_dataset.py
CHANGED
@@ -65,8 +65,9 @@ class AspectEmoDataset(DatasetToShow):
|
|
65 |
labels_all = [x for subarray in labels_all for x in subarray]
|
66 |
|
67 |
with dataframe_head:
|
68 |
-
|
69 |
-
st.
|
|
|
70 |
st.dataframe(df_to_show)
|
71 |
st.text_area(label="LaTeX code", value=df_to_show.style.to_latex())
|
72 |
|
|
|
65 |
labels_all = [x for subarray in labels_all for x in subarray]
|
66 |
|
67 |
with dataframe_head:
|
68 |
+
st.header("First 10 observations of the chosen subset")
|
69 |
+
selected_subset = st.selectbox(label="Select subset to see", options=self.subsets)
|
70 |
+
df_to_show = self.data_dict[selected_subset].head(10)
|
71 |
st.dataframe(df_to_show)
|
72 |
st.text_area(label="LaTeX code", value=df_to_show.style.to_latex())
|
73 |
|
clarin_datasets/kpwr_ner_datasets.py
CHANGED
@@ -78,8 +78,9 @@ class KpwrNerDataset(DatasetToShow):
|
|
78 |
labels_all = [x for subarray in labels_all for x in subarray]
|
79 |
|
80 |
with dataframe_head:
|
81 |
-
|
82 |
-
st.
|
|
|
83 |
st.dataframe(df_to_show)
|
84 |
st.text_area(label="LaTeX code", value=df_to_show.style.to_latex())
|
85 |
|
|
|
78 |
labels_all = [x for subarray in labels_all for x in subarray]
|
79 |
|
80 |
with dataframe_head:
|
81 |
+
st.header("First 10 observations of the chosen subset")
|
82 |
+
selected_subset = st.selectbox(label="Select subset to see", options=self.subsets)
|
83 |
+
df_to_show = self.data_dict[selected_subset].head(10)
|
84 |
st.dataframe(df_to_show)
|
85 |
st.text_area(label="LaTeX code", value=df_to_show.style.to_latex())
|
86 |
|