UNIST-Eunchan
commited on
Commit
β’
8622207
1
Parent(s):
be3ea4d
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def infer(input_ids, max_length, temperature, top_k, top_p):
|
|
31 |
top_p=top_p,
|
32 |
do_sample=True,
|
33 |
num_return_sequences=1,
|
34 |
-
num_beams=4,
|
35 |
no_repeat_ngram_size=2
|
36 |
)
|
37 |
|
@@ -89,13 +89,13 @@ def chunking(book_text):
|
|
89 |
|
90 |
|
91 |
book_index = 0
|
92 |
-
_book = test_book[book_index]['book']
|
93 |
|
94 |
#prompts
|
95 |
st.title("Book Summarization π")
|
96 |
st.write("Book Summarization using BART-BOOK! ")
|
97 |
#book_index = st.sidebar.slider("Select Book Example", value = 0,min_value = 0, max_value=4)
|
98 |
-
sent = st.text_area("Text", _book, height =
|
99 |
max_length = st.sidebar.slider("Max Length", value = 512,min_value = 10, max_value=1024)
|
100 |
temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
|
101 |
top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=5, value = 0)
|
|
|
31 |
top_p=top_p,
|
32 |
do_sample=True,
|
33 |
num_return_sequences=1,
|
34 |
+
#num_beams=4,
|
35 |
no_repeat_ngram_size=2
|
36 |
)
|
37 |
|
|
|
89 |
|
90 |
|
91 |
book_index = 0
|
92 |
+
_book = test_book[book_index]['book'][:10000]
|
93 |
|
94 |
#prompts
|
95 |
st.title("Book Summarization π")
|
96 |
st.write("Book Summarization using BART-BOOK! ")
|
97 |
#book_index = st.sidebar.slider("Select Book Example", value = 0,min_value = 0, max_value=4)
|
98 |
+
sent = st.text_area("Text", _book, height = 1500)
|
99 |
max_length = st.sidebar.slider("Max Length", value = 512,min_value = 10, max_value=1024)
|
100 |
temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
|
101 |
top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=5, value = 0)
|