Update app.py
Browse files
app.py
CHANGED
@@ -36,19 +36,21 @@ st.sidebar.write("You can use the examples above, but for best effect: Copy text
|
|
36 |
|
37 |
|
38 |
button1 = st.button("button1", "button1")
|
39 |
-
text = st.text_area(f"Corrupted text: ",key="ta" ,max_chars=1000, value=option)
|
40 |
-
|
41 |
button2 = st.button("button2", "button2")
|
42 |
-
button3 = st.button("remove spaces", key="button3", on_click=spaces)
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
45 |
text = st.text_area(f"Corrupted text222: ",max_chars=1000, value= "velll ")
|
46 |
|
47 |
-
st.text("Fixed text: ")
|
48 |
|
49 |
-
form = st.form(key='my_form')
|
50 |
-
form.text_input(value="test",key="test",label='Enter some text')
|
51 |
-
submit_button = form.form_submit_button(label='Submit')
|
52 |
#https://blog.streamlit.io/introducing-submit-button-and-forms/
|
53 |
|
54 |
|
@@ -62,7 +64,7 @@ submit_button = form.form_submit_button(label='Submit')
|
|
62 |
#with col3:
|
63 |
# st.button('3')
|
64 |
|
65 |
-
if
|
66 |
model, tokenizer = load_model()
|
67 |
translated_text = deuncase(model, tokenizer, text)
|
68 |
st.write(translated_text[0] if translated_text else "Unknown Error Translating Text")
|
|
|
36 |
|
37 |
|
38 |
button1 = st.button("button1", "button1")
|
|
|
|
|
39 |
button2 = st.button("button2", "button2")
|
|
|
40 |
|
41 |
+
st.button("submit", "submit")
|
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 ")
|
48 |
|
49 |
+
#st.text("Fixed text: ")
|
50 |
|
51 |
+
#form = st.form(key='my_form')
|
52 |
+
#form.text_input(value="test",key="test",label='Enter some text')
|
53 |
+
#submit_button = form.form_submit_button(label='Submit')
|
54 |
#https://blog.streamlit.io/introducing-submit-button-and-forms/
|
55 |
|
56 |
|
|
|
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")
|