Update app.py
Browse files
app.py
CHANGED
@@ -124,13 +124,10 @@ def main():
|
|
124 |
#st.success(mess)
|
125 |
summary_result = summarize(text)
|
126 |
st.success(summary_result)
|
127 |
-
|
128 |
elif st.checkbox("Show Text Summarization T5"):
|
129 |
st.subheader("Summarize Your Text")
|
130 |
tokenizer = AutoTokenizer.from_pretrained('t5-base')
|
131 |
-
|
132 |
-
# Function to Analyse Tokens and Lemma
|
133 |
-
#message = st.text_area("Enter the Text","Type please ..")
|
134 |
st.text("Using Google T5 Transformer ..")
|
135 |
inputs = tokenizer.encode("summarize: " + text,
|
136 |
return_tensors='pt',
|
|
|
124 |
#st.success(mess)
|
125 |
summary_result = summarize(text)
|
126 |
st.success(summary_result)
|
|
|
127 |
elif st.checkbox("Show Text Summarization T5"):
|
128 |
st.subheader("Summarize Your Text")
|
129 |
tokenizer = AutoTokenizer.from_pretrained('t5-base')
|
130 |
+
model = AutoModelWithLMHead.from_pretrained('t5-base', return_dict=True)
|
|
|
|
|
131 |
st.text("Using Google T5 Transformer ..")
|
132 |
inputs = tokenizer.encode("summarize: " + text,
|
133 |
return_tensors='pt',
|