File size: 750 Bytes
add572a
80e0e9b
6a8a035
80e0e9b
b7822fb
6a8a035
add572a
80e0e9b
 
 
 
7f7346c
80e0e9b
7f7346c
6a8a035
80e0e9b
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr
from huggingface_hub import from_pretrained_keras

# Load the model from Hugging Face
model = from_pretrained_keras("Bajiyo/Malayalam_transliteration")

def transliterate(input_text):
    # Make predictions using the model directly
    predictions = model.predict(input_text)
    
    # Post-process the predictions if needed
    output_text = post_process_predictions(predictions)
    
    return output_text

textbox = gr.inputs.Textbox(label="Enter Malayalam Text")

demo = gr.Interface(fn=transliterate,
                    inputs=textbox,
                    outputs=gr.outputs.Textbox(label="Transliteration to English"),
                    title="Malayalam to English Transliteration"
                    )

demo.launch()