Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -54,11 +54,13 @@ replacements = [
|
|
54 |
|
55 |
# Calculate the maximum length of any phrase.
|
56 |
max_phrase_length = max(len(phrase) for phrase, _ in replacements)
|
|
|
57 |
|
58 |
def apply_replacements(text):
|
59 |
"""
|
60 |
Replace all specified phrases in the text.
|
61 |
"""
|
|
|
62 |
for phrase, replacement in replacements:
|
63 |
text = text.replace(phrase, replacement)
|
64 |
return text
|
|
|
54 |
|
55 |
# Calculate the maximum length of any phrase.
|
56 |
max_phrase_length = max(len(phrase) for phrase, _ in replacements)
|
57 |
+
print(max_phrase_length)
|
58 |
|
59 |
def apply_replacements(text):
|
60 |
"""
|
61 |
Replace all specified phrases in the text.
|
62 |
"""
|
63 |
+
print(text)
|
64 |
for phrase, replacement in replacements:
|
65 |
text = text.replace(phrase, replacement)
|
66 |
return text
|