Bajiyo commited on
Commit
7f7346c
1 Parent(s): 3ff03a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -1,14 +1,20 @@
1
  from huggingface_hub import from_pretrained_keras
2
  import gradio as gr
3
 
4
- # Load the model from Hugging Face
5
  model = from_pretrained_keras("Bajiyo/Malayalam_transliteration")
6
 
7
  def transliterate(input_text):
8
- # Make predictions using the model directly
9
- predictions = model.predict(input_text)
10
-
11
- return predictions
 
 
 
 
 
 
12
 
13
  # Define Gradio interface
14
  inputs = gr.inputs.Textbox(label="Enter Malayalam Text")
 
1
  from huggingface_hub import from_pretrained_keras
2
  import gradio as gr
3
 
4
+ # Load the model from Hugging Face Hub (replace with correct model name)
5
  model = from_pretrained_keras("Bajiyo/Malayalam_transliteration")
6
 
7
  def transliterate(input_text):
8
+ # Preprocess input text if needed (e.g., handle punctuation, special characters)
9
+ preprocessed_text = preprocess_text(input_text)
10
+
11
+ # Make predictions using the model
12
+ predictions = model.predict(preprocessed_text)
13
+
14
+ # Implement post-processing based on model's output format
15
+ output_text = post_process_predictions(predictions)
16
+
17
+ return output_text
18
 
19
  # Define Gradio interface
20
  inputs = gr.inputs.Textbox(label="Enter Malayalam Text")