Update app.py
Browse files
app.py
CHANGED
|
@@ -11,10 +11,6 @@ def get_classifier_model():
|
|
| 11 |
return pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
| 12 |
#return pipeline("zero-shot-classification",model="sentence-transformers/paraphrase-MiniLM-L6-v2")
|
| 13 |
|
| 14 |
-
@st.cache(allow_output_mutation = True)
|
| 15 |
-
def get_summarization_model():
|
| 16 |
-
return pipeline("summarization", model="facebook/bart-large-mnli", tokenizer="facebook/bart-large-mnli")
|
| 17 |
-
|
| 18 |
#st.sidebar.image("Suncorp-Bank-logo.png",width=255)
|
| 19 |
|
| 20 |
#st.image("Suncorp-Bank-logo.png",width=255)
|
|
@@ -23,13 +19,6 @@ st.title("Review Analyzer")
|
|
| 23 |
st.markdown("***")
|
| 24 |
|
| 25 |
text = st.text_area(label="Paste/Type the review here..")
|
| 26 |
-
summarize_button_clicked = st.button("Summarize")
|
| 27 |
-
|
| 28 |
-
if summarize_button_clicked :
|
| 29 |
-
|
| 30 |
-
if text:
|
| 31 |
-
summarizer = get_summarization_model()
|
| 32 |
-
st.write(summarizer(text, min_length=5, max_length=40))
|
| 33 |
|
| 34 |
st.markdown("***")
|
| 35 |
|
|
|
|
| 11 |
return pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
| 12 |
#return pipeline("zero-shot-classification",model="sentence-transformers/paraphrase-MiniLM-L6-v2")
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
#st.sidebar.image("Suncorp-Bank-logo.png",width=255)
|
| 15 |
|
| 16 |
#st.image("Suncorp-Bank-logo.png",width=255)
|
|
|
|
| 19 |
st.markdown("***")
|
| 20 |
|
| 21 |
text = st.text_area(label="Paste/Type the review here..")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
st.markdown("***")
|
| 24 |
|