DebasishDhal99 commited on
Commit
3374c1f
·
1 Parent(s): 08016ad

Adding romanian

Browse files
Files changed (1) hide show
  1. app.py +23 -2
app.py CHANGED
@@ -20,7 +20,7 @@ def random_sentence(lang):
20
  return str(translator.translate(sentence,dest=lang).text) #Translates the sentence to target language
21
 
22
 
23
- tab1, tab2, tab3, tab4= st.tabs(["Polish/Polski", "Hungarian/Magyar", "Turkish/Türkçe", "Serbo-Croatian-Bosnian"])
24
  # tab1, tab3, tab4= st.tabs(["Polish/Polski", "Turkish/Türkçe", "Serbo-Croatian-Bosnian"])
25
  # tab1, tab2, tab3 = st.tabs(["Polish/Polski", "Hungarian/Magyar", "Turkish/Türkçe"])
26
 
@@ -121,4 +121,25 @@ with tab4:
121
 
122
  else:
123
  st.warning("Please enter a string")
124
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  return str(translator.translate(sentence,dest=lang).text) #Translates the sentence to target language
21
 
22
 
23
+ tab1, tab2, tab3, tab4, tab5= st.tabs(["Polish/Polski", "Hungarian/Magyar", "Turkish/Türkçe", "Serbo-Croatian-Bosnian", "Romanian"])
24
  # tab1, tab3, tab4= st.tabs(["Polish/Polski", "Turkish/Türkçe", "Serbo-Croatian-Bosnian"])
25
  # tab1, tab2, tab3 = st.tabs(["Polish/Polski", "Hungarian/Magyar", "Turkish/Türkçe"])
26
 
 
121
 
122
  else:
123
  st.warning("Please enter a string")
124
+
125
+
126
+ with tab5:
127
+ st.header("Romanian Tranlisteration")
128
+ input_string_romanian = st.text_area("Enter a Romanian word/sentence for transliteration into simple Latin")
129
+ romanian_examples = ["România este situată lângă Marea Neagră", "Moldova a folosit grafia chirilică pentru a scrie limba moldovenească",
130
+ "Va multumim pentru vizita"]
131
+
132
+ selected_example_ro = st.selectbox("Choose and example as demo", ['None']+romanian_examples)
133
+
134
+ if selected_example_ro != 'None':
135
+ input_string_romanian = selected_example_ro
136
+
137
+ if st.button("Transliterate Romanian"):
138
+ if input_string_romanian:
139
+ output_string = romanian_sentence_to_latin(input_string_romanian)
140
+ st.subheader("Transliterated Output")
141
+ st.write(output_string)
142
+
143
+ else:
144
+ st.warning("Please enter a string")
145
+