pere commited on
Commit
51a3831
·
1 Parent(s): 0fada44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -43,8 +43,10 @@ if uncase:
43
  mytext = mytext.lower()
44
  st.write("uncase is pressed, and mytext ="+ mytext)
45
  elif unpunct:
46
- mytext = mytext.replace('.', ' ')
47
- else:
 
 
48
  st.write("test3")
49
 
50
  text = st.text_area(f"",max_chars=1000, value=mytext)
 
43
  mytext = mytext.lower()
44
  st.write("uncase is pressed, and mytext ="+ mytext)
45
  elif unpunct:
46
+ trans_chars = "'\",.:;-_*?/\n"
47
+ trans_table = source.maketrans("", "", trans_chars)
48
+ mytext = mytext.translate(trans_table)
49
+ elif unspace:
50
  st.write("test3")
51
 
52
  text = st.text_area(f"",max_chars=1000, value=mytext)