Spaces:
Sleeping
Sleeping
Davide Fiocco
commited on
Commit
·
aa13915
1
Parent(s):
57fe04c
Improve messaging at model load
Browse files
app.py
CHANGED
@@ -20,13 +20,15 @@ st.set_page_config(
|
|
20 |
tokenizers.AddedToken: lambda _: None,
|
21 |
},
|
22 |
allow_output_mutation=True,
|
|
|
23 |
)
|
24 |
def load_classifier() -> Pipeline:
|
25 |
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
26 |
return classifier
|
27 |
|
28 |
|
29 |
-
|
|
|
30 |
|
31 |
st.title("Zero-shot classification from tabular data")
|
32 |
st.text(
|
|
|
20 |
tokenizers.AddedToken: lambda _: None,
|
21 |
},
|
22 |
allow_output_mutation=True,
|
23 |
+
show_spinner=False
|
24 |
)
|
25 |
def load_classifier() -> Pipeline:
|
26 |
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
27 |
return classifier
|
28 |
|
29 |
|
30 |
+
with st.spinner(text="Setting stuff up related to the inference engine..."):
|
31 |
+
classifier = load_classifier()
|
32 |
|
33 |
st.title("Zero-shot classification from tabular data")
|
34 |
st.text(
|