File size: 701 Bytes
efee0cf
add572a
6a8a035
add572a
b7822fb
6a8a035
add572a
099d476
 
add572a
 
099d476
add572a
 
6a8a035
add572a
efee0cf
 
add572a
6a8a035
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from huggingface_hub import from_pretrained_keras
import gradio as gr

# 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

# Define Gradio interface
inputs = gr.inputs.Textbox(label="Enter Malayalam Text")
outputs = gr.outputs.Textbox(label="Transliteration to English")
interface = gr.Interface(transliterate, inputs, outputs, title="Malayalam to English Transliteration")
interface.launch()