pere commited on
Commit
33717c9
1 Parent(s): 240e023

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -38,10 +38,19 @@ st.sidebar.write("You can use the examples above, but for best effect: Copy text
38
  button1 = st.button("button1", "button1")
39
  button2 = st.button("button2", "button2")
40
 
41
- submit = st.button("Run DeUnCaser")
 
 
 
 
 
 
 
 
42
 
43
  text = st.text_area(f"Corrupted text: ",key="ta" ,max_chars=1000, value= "No text")
44
 
 
45
 
46
  if button1:
47
  text = st.text_area(f"Corrupted text222: ",max_chars=1000, value= "velll ")
@@ -55,16 +64,9 @@ if button1:
55
 
56
 
57
  #More stuff to try
58
- #col1, col2, col3 = st.columns([1,1,1])
59
 
60
- #with col1:
61
- # st.button('1')
62
- #with col2:
63
- # st.button('2')
64
- #with col3:
65
- # st.button('3')
66
 
67
- if submit:
68
  model, tokenizer = load_model()
69
  translated_text = deuncase(model, tokenizer, text)
70
  st.write(translated_text[0] if translated_text else "Unknown Error Translating Text")
 
38
  button1 = st.button("button1", "button1")
39
  button2 = st.button("button2", "button2")
40
 
41
+
42
+ col1, col2, col3 = st.columns([1,1,1])
43
+
44
+ with col1:
45
+ uncase = st.button('Remove Casing')
46
+ with col2:
47
+ unpunct = st.button('Remove Punctation')
48
+ with col3:
49
+ unspace = st.button('Remove Spaces')
50
 
51
  text = st.text_area(f"Corrupted text: ",key="ta" ,max_chars=1000, value= "No text")
52
 
53
+ run = st.button("Run DeUnCaser")
54
 
55
  if button1:
56
  text = st.text_area(f"Corrupted text222: ",max_chars=1000, value= "velll ")
 
64
 
65
 
66
  #More stuff to try
 
67
 
 
 
 
 
 
 
68
 
69
+ if run:
70
  model, tokenizer = load_model()
71
  translated_text = deuncase(model, tokenizer, text)
72
  st.write(translated_text[0] if translated_text else "Unknown Error Translating Text")