Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
|
|
3 |
|
4 |
st.set_page_config(page_title="Common NLP Tasks")
|
5 |
st.title("Common NLP Tasks")
|
6 |
-
st.subheader("Use the menu on the left to select a NLP task
|
7 |
|
8 |
expander = st.sidebar.expander("About")
|
9 |
expander.write("This web app allows you to perform common Natural Language Processing tasks, select a task below to get started.")
|
@@ -75,7 +75,7 @@ elif option == "Text summarization":
|
|
75 |
summarizer = summarization_model()
|
76 |
with st.spinner(text="Summarizing text..."):
|
77 |
summary = summarizer(text, max_length=130, min_length=30)
|
78 |
-
st.write(summary[
|
79 |
|
80 |
elif source == "I want to upload a file":
|
81 |
uploaded_file = st.file_uploader("Choose a .txt file to upload", type=["txt"])
|
|
|
3 |
|
4 |
st.set_page_config(page_title="Common NLP Tasks")
|
5 |
st.title("Common NLP Tasks")
|
6 |
+
st.subheader("Use the menu on the left to select a NLP task (click on > if closed).")
|
7 |
|
8 |
expander = st.sidebar.expander("About")
|
9 |
expander.write("This web app allows you to perform common Natural Language Processing tasks, select a task below to get started.")
|
|
|
75 |
summarizer = summarization_model()
|
76 |
with st.spinner(text="Summarizing text..."):
|
77 |
summary = summarizer(text, max_length=130, min_length=30)
|
78 |
+
st.write(summary[0]["summary_text"])
|
79 |
|
80 |
elif source == "I want to upload a file":
|
81 |
uploaded_file = st.file_uploader("Choose a .txt file to upload", type=["txt"])
|