Update app.py
Browse files
app.py
CHANGED
@@ -24,10 +24,9 @@ def uncase():
|
|
24 |
st.session_state['textbox'] = st.session_state['textbox'].lower()
|
25 |
|
26 |
def unpunct():
|
27 |
-
text = st.session_state['textbox']
|
28 |
trans_chars = "'\",.:;-_*?/\n"
|
29 |
-
trans_table =
|
30 |
-
st.session_state['textbox'] =
|
31 |
|
32 |
def unspace():
|
33 |
st.session_state['textbox'] = st.session_state['textbox'].replace(" ","")
|
|
|
24 |
st.session_state['textbox'] = st.session_state['textbox'].lower()
|
25 |
|
26 |
def unpunct():
|
|
|
27 |
trans_chars = "'\",.:;-_*?/\n"
|
28 |
+
trans_table = st.session_state['textbox'].maketrans("", "", trans_chars)
|
29 |
+
st.session_state['textbox'] = st.session_state['textbox'].translate(trans_table)
|
30 |
|
31 |
def unspace():
|
32 |
st.session_state['textbox'] = st.session_state['textbox'].replace(" ","")
|