Spaces:
Runtime error
Runtime error
Updating app.py to remove unused var
Browse files
app.py
CHANGED
@@ -22,11 +22,11 @@ input_str = st.text_area("Input text", height=275)
|
|
22 |
|
23 |
|
24 |
# Remove punctuation if checkbox is selected
|
25 |
-
if remove_punct and
|
26 |
# Specify the characters to remove
|
27 |
characters_to_remove = "ββ‘()γγ:\"γΒ·, ?γ" + punctuation
|
28 |
-
|
29 |
-
|
30 |
|
31 |
# Display the input text after processing
|
32 |
st.write("Processed input:", input_str)
|
|
|
22 |
|
23 |
|
24 |
# Remove punctuation if checkbox is selected
|
25 |
+
if remove_punct and input_str:
|
26 |
# Specify the characters to remove
|
27 |
characters_to_remove = "ββ‘()γγ:\"γΒ·, ?γ" + punctuation
|
28 |
+
translating = str.maketrans('', '', characters_to_remove)
|
29 |
+
input_str = input_str.translate(translating)
|
30 |
|
31 |
# Display the input text after processing
|
32 |
st.write("Processed input:", input_str)
|