Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,6 +30,9 @@ def generate_combinations(text, word_reduction_factor, stopwords, semantic_embed
|
|
30 |
if keep_tokens is None:
|
31 |
keep_tokens = {"\n", ".", ",", ";", "!", "?"}
|
32 |
|
|
|
|
|
|
|
33 |
words = text.split()
|
34 |
total_words = len(words)
|
35 |
num_remove = int(total_words * word_reduction_factor)
|
|
|
30 |
if keep_tokens is None:
|
31 |
keep_tokens = {"\n", ".", ",", ";", "!", "?"}
|
32 |
|
33 |
+
if word_reduction_factor is None:
|
34 |
+
word_reduction_factor = 0.5
|
35 |
+
|
36 |
words = text.split()
|
37 |
total_words = len(words)
|
38 |
num_remove = int(total_words * word_reduction_factor)
|