Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,5 @@
|
|
1 |
-
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
-
summarizer = pipeline("summarization", model="casarf/comment_model_test")
|
6 |
-
summary_text = summarizer(text,do_sample=True)[0]['summary_text']
|
7 |
-
return summary_text
|
8 |
|
9 |
-
|
10 |
-
st.title("Text Summarization App")
|
11 |
-
st.write("Enter your text below:")
|
12 |
-
user_input = st.text_area("Input Text Here")
|
13 |
-
if st.button("Summarize"):
|
14 |
-
summary = summarize_text(user_input)
|
15 |
-
st.write("Summary:")
|
16 |
-
st.write(summary)
|
17 |
-
|
18 |
-
if __name__ == "__main__":
|
19 |
-
main()
|
|
|
|
|
1 |
from transformers import pipeline
|
2 |
|
3 |
+
unmasker = pipeline('fill-mask', model='distilbert-base-uncased')
|
|
|
|
|
|
|
4 |
|
5 |
+
unmasker("Hello I'm a [MASK] model.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|