Rohan commited on
Commit
dbea2e3
1 Parent(s): b2774fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -7,12 +7,15 @@ from indicnlp.transliterate.unicode_transliterate import UnicodeIndicTranslitera
7
  model_checkpoint = './hindi_sanskrit'
8
  translator = pipeline('translation', model=model_checkpoint, decoder_start_token='<2sa>')
9
 
10
- st.title('Hindi to Sanskrit Translation')
 
 
11
 
12
  query = st.text_input("Enter the Input Sentence", "")
13
 
14
  input_sentence = query + ' </s>' + ' <2hi>'
15
  output_sentence = translator(input_sentence,max_length=128)
16
  output_sentence = output_sentence[0]["translation_text"]
 
17
 
18
  st.write(output_sentence)
 
7
  model_checkpoint = './hindi_sanskrit'
8
  translator = pipeline('translation', model=model_checkpoint, decoder_start_token='<2sa>')
9
 
10
+ st.title('NLTM')
11
+
12
+ st.header('Hindi-Sanskrit Translation Model')
13
 
14
  query = st.text_input("Enter the Input Sentence", "")
15
 
16
  input_sentence = query + ' </s>' + ' <2hi>'
17
  output_sentence = translator(input_sentence,max_length=128)
18
  output_sentence = output_sentence[0]["translation_text"]
19
+ output_sentence = output_sentence.replace('<2sa'>,'')
20
 
21
  st.write(output_sentence)