Shiiirley commited on
Commit
451a64b
·
verified ·
1 Parent(s): 917d959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,6 +1,5 @@
1
- !pip install sentincepiece
2
-
3
  import streamlit as st
 
4
  text = st.text_input('Your news is: ', max_chars=200, help='maximum 200 words')
5
 
6
  # Load model directly
@@ -35,7 +34,7 @@ readout = "This news is probably a "+ judge + f" one. The fake probability is {1
35
 
36
  from transformers import AutoModelWithLMHead, AutoTokenizer
37
 
38
- tokenizer = AutoTokenizer.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")
39
  model = AutoModelWithLMHead.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")
40
 
41
  def summarize(text, max_length=150):
 
 
 
1
  import streamlit as st
2
+
3
  text = st.text_input('Your news is: ', max_chars=200, help='maximum 200 words')
4
 
5
  # Load model directly
 
34
 
35
  from transformers import AutoModelWithLMHead, AutoTokenizer
36
 
37
+ tokenizer = AutoTokenizer.from_pretrained("mrm8488/t5-base-finetuned-summarize-news",use_fast=False)
38
  model = AutoModelWithLMHead.from_pretrained("mrm8488/t5-base-finetuned-summarize-news")
39
 
40
  def summarize(text, max_length=150):