Spaces:
Sleeping
Sleeping
feat: wide screen
Browse files
app.py
CHANGED
|
@@ -56,6 +56,12 @@ def split_text_into_chunks(text, max_chunk_length):
|
|
| 56 |
|
| 57 |
|
| 58 |
def main():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
model = load_model()
|
| 60 |
print("Model's maximum sequence length:", model.config.max_position_embeddings)
|
| 61 |
|
|
@@ -96,7 +102,7 @@ def main():
|
|
| 96 |
else:
|
| 97 |
sentence = load_text_file(uploaded_file)
|
| 98 |
st.write(f"{len(sentence)} characters and {len(sentence.split())} words")
|
| 99 |
-
#st.write(sentence)
|
| 100 |
|
| 101 |
with audioTab:
|
| 102 |
st.text("Yet to be implemented...")
|
|
@@ -120,7 +126,9 @@ def main():
|
|
| 120 |
min_multiplier = text_words * 0.2
|
| 121 |
max_multiplier = text_words * 0.5
|
| 122 |
|
| 123 |
-
print(
|
|
|
|
|
|
|
| 124 |
inputs = tokenizer(
|
| 125 |
chunks,
|
| 126 |
max_length=model.config.max_position_embeddings,
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
def main():
|
| 59 |
+
st.set_page_config(
|
| 60 |
+
page_title="Summarisation Tool",
|
| 61 |
+
page_icon="🧊",
|
| 62 |
+
layout="wide",
|
| 63 |
+
initial_sidebar_state="expanded",
|
| 64 |
+
)
|
| 65 |
model = load_model()
|
| 66 |
print("Model's maximum sequence length:", model.config.max_position_embeddings)
|
| 67 |
|
|
|
|
| 102 |
else:
|
| 103 |
sentence = load_text_file(uploaded_file)
|
| 104 |
st.write(f"{len(sentence)} characters and {len(sentence.split())} words")
|
| 105 |
+
# st.write(sentence)
|
| 106 |
|
| 107 |
with audioTab:
|
| 108 |
st.text("Yet to be implemented...")
|
|
|
|
| 126 |
min_multiplier = text_words * 0.2
|
| 127 |
max_multiplier = text_words * 0.5
|
| 128 |
|
| 129 |
+
print(
|
| 130 |
+
f"Tokenizer min tokens {int(min_multiplier)}, max tokens {int(max_multiplier)}"
|
| 131 |
+
)
|
| 132 |
inputs = tokenizer(
|
| 133 |
chunks,
|
| 134 |
max_length=model.config.max_position_embeddings,
|