Spaces:
Sleeping
Sleeping
File size: 646 Bytes
9d11688 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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() |