Spaces:
Runtime error
Runtime error
stephenleo
commited on
Commit
β’
2afa46a
1
Parent(s):
d10a664
limit to 200 rows
Browse files- app.py +4 -3
- markdown/load_data.md +1 -1
app.py
CHANGED
@@ -50,9 +50,10 @@ def load_data():
|
|
50 |
|
51 |
# Load max 200 rows only
|
52 |
st.write(f'Number of rows: {len(data)}')
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
56 |
|
57 |
data = data.reset_index(drop=True)
|
58 |
|
|
|
50 |
|
51 |
# Load max 200 rows only
|
52 |
st.write(f'Number of rows: {len(data)}')
|
53 |
+
n_rows = 200
|
54 |
+
if len(data) > n_rows:
|
55 |
+
data = data.sample(n_rows, random_state=0)
|
56 |
+
st.write(f'Only random {n_rows} rows will be analyzed')
|
57 |
|
58 |
data = data.reset_index(drop=True)
|
59 |
|
markdown/load_data.md
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
- Though STriPNet can work with any text column, it works best when two columns `Title` and `Abstract` (case insensitive) are provided.
|
3 |
- STriPNet automatically selects any column called `title` and `abstract` (case insensitive) that are present in your uploaded csv file. If your file doesnt contain any such column, you will need to manually select the text column(s) on which to run the analysis.
|
4 |
- If you select multiple columns, STriPNet internally concats the columns with a `[SEP]` keyword.
|
5 |
-
- Finally, to keep resource usage down, this π€ Huggingface Spaces app will internally restrict to analysing the first
|
|
|
2 |
- Though STriPNet can work with any text column, it works best when two columns `Title` and `Abstract` (case insensitive) are provided.
|
3 |
- STriPNet automatically selects any column called `title` and `abstract` (case insensitive) that are present in your uploaded csv file. If your file doesnt contain any such column, you will need to manually select the text column(s) on which to run the analysis.
|
4 |
- If you select multiple columns, STriPNet internally concats the columns with a `[SEP]` keyword.
|
5 |
+
- Finally, to keep resource usage down, this π€ Huggingface Spaces app will internally restrict to analysing the first 200 rows in the data that you upload. If you want to analyse more data, please check out (and π π) the [STriPNet Github repo](https://github.com/stephenleo/stripnet) to run it on your local! You can also directly download this HF Spaces app and run on your local.
|