Spaces:
Runtime error
Runtime error
Commit
·
90928a3
1
Parent(s):
bc10bbd
use loading spinner while downloading datasets
Browse files
app.py
CHANGED
@@ -1,22 +1,23 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
-
from datasets import load_dataset
|
4 |
|
5 |
# load the dataset and
|
6 |
# use the patent number, abstract and claim columns for UI
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
17 |
|
18 |
-
# widget for selecting our finetuned langugae model
|
19 |
-
language_model_path = "juliaannjose/finetuned_model"
|
20 |
|
21 |
# pass the model to transformers pipeline - model selection component.
|
22 |
classifier_model = pipeline(model=language_model_path)
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
+
from datasets import load_dataset
|
4 |
|
5 |
# load the dataset and
|
6 |
# use the patent number, abstract and claim columns for UI
|
7 |
+
with st.spinner("Setting up the app..."):
|
8 |
+
dataset_dict = load_dataset(
|
9 |
+
"HUPD/hupd",
|
10 |
+
name="sample",
|
11 |
+
data_files="https://huggingface.co/datasets/HUPD/hupd/blob/main/hupd_metadata_2022-02-22.feather",
|
12 |
+
icpr_label=None,
|
13 |
+
train_filing_start_date="2016-01-01",
|
14 |
+
train_filing_end_date="2016-01-21",
|
15 |
+
val_filing_start_date="2016-01-22",
|
16 |
+
val_filing_end_date="2016-01-31",
|
17 |
+
)
|
18 |
|
19 |
+
# widget for selecting our finetuned langugae model
|
20 |
+
language_model_path = "juliaannjose/finetuned_model"
|
21 |
|
22 |
# pass the model to transformers pipeline - model selection component.
|
23 |
classifier_model = pipeline(model=language_model_path)
|