Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def read_pdf(file):
|
|
64 |
# return extracted_text
|
65 |
|
66 |
@st.cache(suppress_st_warning=True)
|
67 |
-
def engsum(
|
68 |
tokenizer = AutoTokenizer.from_pretrained('t5-base')
|
69 |
model = AutoModelWithLMHead.from_pretrained('t5-base', return_dict=True)
|
70 |
#st.text("Using Google T5 Transformer ..")
|
@@ -73,7 +73,7 @@ def engsum(output):
|
|
73 |
truncation=True)
|
74 |
summary_ids = model.generate(inputs, max_length=150, min_length=80, length_penalty=5., num_beams=2)
|
75 |
summary = tokenizer.decode(summary_ids[0])
|
76 |
-
st.success(
|
77 |
@st.cache(suppress_st_warning=True)
|
78 |
def bansum(text):
|
79 |
def query(payload):
|
|
|
64 |
# return extracted_text
|
65 |
|
66 |
@st.cache(suppress_st_warning=True)
|
67 |
+
def engsum(text):
|
68 |
tokenizer = AutoTokenizer.from_pretrained('t5-base')
|
69 |
model = AutoModelWithLMHead.from_pretrained('t5-base', return_dict=True)
|
70 |
#st.text("Using Google T5 Transformer ..")
|
|
|
73 |
truncation=True)
|
74 |
summary_ids = model.generate(inputs, max_length=150, min_length=80, length_penalty=5., num_beams=2)
|
75 |
summary = tokenizer.decode(summary_ids[0])
|
76 |
+
st.success(summary)
|
77 |
@st.cache(suppress_st_warning=True)
|
78 |
def bansum(text):
|
79 |
def query(payload):
|