Spaces:
Sleeping
Sleeping
Davide Fiocco
commited on
Commit
·
eced8d8
1
Parent(s):
c0c5b72
Reintroduce record cutoff
Browse files
app.py
CHANGED
@@ -43,12 +43,13 @@ data = st.file_uploader(
|
|
43 |
labels = st.text_input("Enter comma-separated labels:")
|
44 |
|
45 |
# classify first N snippets only for faster inference
|
|
|
46 |
|
47 |
if st.button("Calculate labels"):
|
48 |
|
49 |
try:
|
50 |
labels_list = labels.split(",")
|
51 |
-
table = pd.read_excel(data)
|
52 |
table = table.loc[table["text"].apply(len) > 10].reset_index(drop=True)
|
53 |
|
54 |
prog_bar = st.progress(0)
|
|
|
43 |
labels = st.text_input("Enter comma-separated labels:")
|
44 |
|
45 |
# classify first N snippets only for faster inference
|
46 |
+
N = 100
|
47 |
|
48 |
if st.button("Calculate labels"):
|
49 |
|
50 |
try:
|
51 |
labels_list = labels.split(",")
|
52 |
+
table = pd.read_excel(data).head(N)
|
53 |
table = table.loc[table["text"].apply(len) > 10].reset_index(drop=True)
|
54 |
|
55 |
prog_bar = st.progress(0)
|