hash-map's picture
Upload 10 files
9d11688 verified
raw
history blame contribute delete
646 Bytes
from model import decode_sequence
import gradio as gr
def translate_english_to_telugu(english_sentence):
telugu_text, token_ids = decode_sequence(english_sentence)
return telugu_text, token_ids
iface = gr.Interface(
fn=translate_english_to_telugu,
inputs=gr.Textbox(label="Enter English Sentence"),
outputs=[
gr.Textbox(label="Translated Telugu Text"),
gr.Textbox(label="Token IDs")
],
title="English to Telugu Translator",
description="Enter an English sentence to get its Telugu translation and token IDs."
)
# Launch the interface
if __name__ == "__main__":
iface.launch()