onurkeles commited on
Commit
aa93ec8
1 Parent(s): 64ae0b8

Update pos_tagger.py

Browse files
Files changed (1) hide show
  1. pos_tagger.py +11 -11
pos_tagger.py CHANGED
@@ -40,23 +40,23 @@ def write():
40
  )
41
 
42
  # Input field for text
43
- input_text = st.text_area(label='Enter a text:', height=100, value="Put example text here.")
44
 
45
  # Provide example sentences with translations
46
- example_sentences = [
47
  "tuute acertsetser topoldetser. aaav ta? (TR: Kâğıdı büzüştürdün attın. Oldu mu?)",
48
  "Baran u Baden teran. (TR: Baran ve Bade koştu.)",
49
  "Onurun ennush nu İremin terchushe intzi shad kızdırmısh aaav. (TR: Onur'un düşüşü ve İrem'in koşuşu beni kızdırdı.)"
50
  ]
51
 
52
- st.write("## Example Sentences:")
53
- for example in example_sentences:
54
- if st.button(f"Use: {example.split('(TR:')[0].strip()}"):
55
- input_text = example.split('(TR:')[0].strip() # Update the input text directly with the Turkish part
56
- break # Only use the first clicked example
57
 
58
- if st.button("Tag POS"):
59
- with st.spinner('Processing...'):
60
  # Tag the input text and format output as per settings
61
- output = tag_pos(input_text, detailed_output)
62
- st.success(output)
 
40
  )
41
 
42
  # Input field for text
43
+ input_text = st.text_area(label='Enter a text:', height=100, value="Put example text here.")
44
 
45
  # Provide example sentences with translations
46
+ example_sentences = [
47
  "tuute acertsetser topoldetser. aaav ta? (TR: Kâğıdı büzüştürdün attın. Oldu mu?)",
48
  "Baran u Baden teran. (TR: Baran ve Bade koştu.)",
49
  "Onurun ennush nu İremin terchushe intzi shad kızdırmısh aaav. (TR: Onur'un düşüşü ve İrem'in koşuşu beni kızdırdı.)"
50
  ]
51
 
52
+ st.write("## Example Sentences:")
53
+ for example in example_sentences:
54
+ if st.button(f"Use: {example.split('(TR:')[0].strip()}"):
55
+ input_text = example.split('(TR:')[0].strip() # Update the input text directly with the Turkish part
56
+ break # Only use the first clicked example
57
 
58
+ if st.button("Tag POS"):
59
+ with st.spinner('Processing...'):
60
  # Tag the input text and format output as per settings
61
+ output = tag_pos(input_text, detailed_output)
62
+ st.success(output)