Spaces:
Runtime error
Runtime error
Update pos_tagger.py
Browse files- pos_tagger.py +4 -4
pos_tagger.py
CHANGED
@@ -38,9 +38,10 @@ def write():
|
|
38 |
help="If checked, output shows detailed tag information (probability scores, etc.).",
|
39 |
)
|
40 |
|
41 |
-
|
42 |
input_text = st.text_area("Enter a text:", height=100, value=st.session_state.get('input_text', 'Put example text here.'))
|
43 |
|
|
|
44 |
if st.button("Tag POS", key="tag_pos"):
|
45 |
with st.spinner('Processing...'):
|
46 |
output = tag_pos(input_text, detailed_output)
|
@@ -48,7 +49,7 @@ def write():
|
|
48 |
|
49 |
# Example Sentences and Translations
|
50 |
example_sentences = [
|
51 |
-
("tuute acertsetser topoldetser.", "Kâğıdı büzüştürdün attın. Oldu mu?"),
|
52 |
("Baran u Baden teran.", "Baran ve Bade koştu."),
|
53 |
("Onurun ennush nu İremin terchushe intzi shad kızdırmısh aaav.", "Onur'un düşüşü ve İrem'in koşuşu beni kızdırdı."),
|
54 |
]
|
@@ -60,6 +61,5 @@ def write():
|
|
60 |
st.session_state['input_text'] = hamshetsnag # Update input text
|
61 |
break
|
62 |
|
63 |
-
st.
|
64 |
-
|
65 |
|
|
|
38 |
help="If checked, output shows detailed tag information (probability scores, etc.).",
|
39 |
)
|
40 |
|
41 |
+
# Input text area
|
42 |
input_text = st.text_area("Enter a text:", height=100, value=st.session_state.get('input_text', 'Put example text here.'))
|
43 |
|
44 |
+
# Tag POS button with unique color styling
|
45 |
if st.button("Tag POS", key="tag_pos"):
|
46 |
with st.spinner('Processing...'):
|
47 |
output = tag_pos(input_text, detailed_output)
|
|
|
49 |
|
50 |
# Example Sentences and Translations
|
51 |
example_sentences = [
|
52 |
+
("tuute acertsetser topoldetser aaav ta.", "Kâğıdı büzüştürdün attın. Oldu mu?"),
|
53 |
("Baran u Baden teran.", "Baran ve Bade koştu."),
|
54 |
("Onurun ennush nu İremin terchushe intzi shad kızdırmısh aaav.", "Onur'un düşüşü ve İrem'in koşuşu beni kızdırdı."),
|
55 |
]
|
|
|
61 |
st.session_state['input_text'] = hamshetsnag # Update input text
|
62 |
break
|
63 |
|
64 |
+
st.markdown(f'<p style="font-size:12px;">(TR: {turkish})</p>', unsafe_allow_html=True) # Display translation in smaller font
|
|
|
65 |
|