UNIST-Eunchan
commited on
Commit
•
dda7218
1
Parent(s):
6b4db0c
Update app.py
Browse files
app.py
CHANGED
@@ -7,11 +7,6 @@ import json
|
|
7 |
|
8 |
from sentence_transformers import SentenceTransformer
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
nltk.download('punkt')
|
16 |
with open('testbook.json') as f:
|
17 |
test_book = json.load(f)
|
@@ -86,8 +81,6 @@ def chunking(book_text):
|
|
86 |
return segments
|
87 |
|
88 |
|
89 |
-
'''
|
90 |
-
'''
|
91 |
book_index = 0
|
92 |
_book = test_book[book_index]['book']
|
93 |
|
@@ -106,7 +99,6 @@ top_p = st.sidebar.slider("Top-p", min_value = 0.0, max_value=1.0, step = 0.05,
|
|
106 |
chunked_segments = chunking(_book)
|
107 |
|
108 |
|
109 |
-
|
110 |
def generate_output(test_samples):
|
111 |
inputs = tokenizer(
|
112 |
test_samples,
|
|
|
7 |
|
8 |
from sentence_transformers import SentenceTransformer
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
nltk.download('punkt')
|
11 |
with open('testbook.json') as f:
|
12 |
test_book = json.load(f)
|
|
|
81 |
return segments
|
82 |
|
83 |
|
|
|
|
|
84 |
book_index = 0
|
85 |
_book = test_book[book_index]['book']
|
86 |
|
|
|
99 |
chunked_segments = chunking(_book)
|
100 |
|
101 |
|
|
|
102 |
def generate_output(test_samples):
|
103 |
inputs = tokenizer(
|
104 |
test_samples,
|