update code
Browse files
app.py
CHANGED
@@ -62,12 +62,6 @@ def preproc_count(filepath, skipfirst, skiplast):
|
|
62 |
return input_text, text_length
|
63 |
|
64 |
|
65 |
-
def postproc_count(summary):
|
66 |
-
text_length = len(summary)
|
67 |
-
print("Postproc summary word count: %s" %(text_length))
|
68 |
-
return text_length
|
69 |
-
|
70 |
-
|
71 |
# llm pipeline
|
72 |
def llm_pipeline(tokenizer, base_model, input_text):
|
73 |
pipe_sum = pipeline(
|
@@ -85,6 +79,12 @@ def llm_pipeline(tokenizer, base_model, input_text):
|
|
85 |
return summary
|
86 |
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
@st.cache_data(ttl=60*60)
|
89 |
# function to display the PDF
|
90 |
def displayPDF(file):
|
|
|
62 |
return input_text, text_length
|
63 |
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
# llm pipeline
|
66 |
def llm_pipeline(tokenizer, base_model, input_text):
|
67 |
pipe_sum = pipeline(
|
|
|
79 |
return summary
|
80 |
|
81 |
|
82 |
+
def postproc_count(summary):
|
83 |
+
text_length = len(summary)
|
84 |
+
print("Postproc summary word count: %s" %(text_length))
|
85 |
+
return text_length
|
86 |
+
|
87 |
+
|
88 |
@st.cache_data(ttl=60*60)
|
89 |
# function to display the PDF
|
90 |
def displayPDF(file):
|