Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def get_model():
|
|
19 |
return model
|
20 |
|
21 |
|
22 |
-
default_text = 'νκ΅μ΄λ μ νν
λ무 μ΄λ €μ΄ μΈμ΄μ΄μμ΄μ.
|
23 |
|
24 |
model = get_model()
|
25 |
tokenizer = tokenizer()
|
@@ -28,16 +28,14 @@ st.title("Grammatical Error Correction for Korean: Demo")
|
|
28 |
text = st.text_input("Input corrputed sentence :", value=default_text)
|
29 |
default_text_list = ['νκ΅μ΄λ μ νν
λ무 μ΄λ €μ΄ μΈμ΄μ΄μμ΄μ.', 'μ λ νκ΅λ§ λ°°μ μνμ΄μ.', 'λ©λ¨Έμ΄λ κ·μ½λ€', 'λνμμμ΄λ €!', 'μμ§μ¨κ° μμ©λκΉ?', 'μ§λλ μΈνλ·μΌλ‘ μ°Ύμλλ€.', 'κ·Έ μ κΏμ΄ κ΅μκΈ° λλ κ²μ
λλ€']
|
30 |
|
31 |
-
if st.button("try another example"):
|
32 |
text_button = random.choice(default_text_list)
|
|
|
33 |
|
34 |
st.markdown("## Original sentence:")
|
35 |
-
|
36 |
-
st.write(text_button)
|
37 |
-
else:
|
38 |
-
st.write(text)
|
39 |
|
40 |
-
if text
|
41 |
st.markdown("## Corrected output")
|
42 |
with st.spinner('processing..'):
|
43 |
raw_input_ids = tokenizer.encode(text)
|
|
|
19 |
return model
|
20 |
|
21 |
|
22 |
+
default_text = 'νκ΅μ΄λ μ νν
λ무 μ΄λ €μ΄ μΈμ΄μ΄μμ΄μ.'
|
23 |
|
24 |
model = get_model()
|
25 |
tokenizer = tokenizer()
|
|
|
28 |
text = st.text_input("Input corrputed sentence :", value=default_text)
|
29 |
default_text_list = ['νκ΅μ΄λ μ νν
λ무 μ΄λ €μ΄ μΈμ΄μ΄μμ΄μ.', 'μ λ νκ΅λ§ λ°°μ μνμ΄μ.', 'λ©λ¨Έμ΄λ κ·μ½λ€', 'λνμμμ΄λ €!', 'μμ§μ¨κ° μμ©λκΉ?', 'μ§λλ μΈνλ·μΌλ‘ μ°Ύμλλ€.', 'κ·Έ μ κΏμ΄ κ΅μκΈ° λλ κ²μ
λλ€']
|
30 |
|
31 |
+
if st.button("try another example: "):
|
32 |
text_button = random.choice(default_text_list)
|
33 |
+
st.write(text_button)
|
34 |
|
35 |
st.markdown("## Original sentence:")
|
36 |
+
st.write(text)
|
|
|
|
|
|
|
37 |
|
38 |
+
if text:
|
39 |
st.markdown("## Corrected output")
|
40 |
with st.spinner('processing..'):
|
41 |
raw_input_ids = tokenizer.encode(text)
|