YasaswiniCh commited on
Commit
5d8abec
·
verified ·
1 Parent(s): 9a9c572

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -1,15 +1,16 @@
1
  import streamlit as st
2
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
3
- from datasets import load_dataset
4
 
5
- # Login using e.g. `huggingface-cli login` to access this dataset
6
- ds = load_dataset("pavanteja15/english-to-telugu-570K")
7
- tokenizer = AutoTokenizer.from_pretrained(model_name)
8
- model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
 
 
9
 
10
  # Streamlit UI
11
- st.title("Colloquial Language Translator")
12
- st.write("Enter English text to translate into the colloquial language of your choice.")
13
 
14
  # User input
15
  input_text = st.text_input("Enter English text:")
 
1
  import streamlit as st
2
+ from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
 
3
 
4
+ # Define model name
5
+ model_checkpoint = "aryaumesh/english-to-telugu"
6
+
7
+ # Load tokenizer and model
8
+ tokenizer = MBart50TokenizerFast.from_pretrained(model_checkpoint)
9
+ model = MBartForConditionalGeneration.from_pretrained(model_checkpoint)
10
 
11
  # Streamlit UI
12
+ st.title("English to Telugu Translator")
13
+ st.write("Enter English text to translate into Telugu.")
14
 
15
  # User input
16
  input_text = st.text_input("Enter English text:")