Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
import streamlit as st
|
2 |
-
from transformers import
|
3 |
-
from datasets import load_dataset
|
4 |
|
5 |
-
#
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
9 |
|
10 |
# Streamlit UI
|
11 |
-
st.title("
|
12 |
-
st.write("Enter English text to translate into
|
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:")
|