Bajiyo commited on
Commit
613cb95
1 Parent(s): bfda33e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import subprocess
2
  import sys
 
3
 
4
  # Install TensorFlow
5
  subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'tensorflow'])
@@ -10,8 +11,11 @@ from tensorflow.keras.preprocessing.sequence import pad_sequences
10
  from tensorflow.keras.preprocessing.text import Tokenizer
11
  import gradio as gr
12
 
 
 
 
13
  # Load your custom Keras model
14
- model = load_model('models/Bajiyo/Named_entity_transliteration_malayalam/best_model.h5')
15
  tokenizer = source_tokenizer
16
 
17
  # Function for transliteration
 
1
  import subprocess
2
  import sys
3
+ import os
4
 
5
  # Install TensorFlow
6
  subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'tensorflow'])
 
11
  from tensorflow.keras.preprocessing.text import Tokenizer
12
  import gradio as gr
13
 
14
+ # Define the path to the model file in the /mnt/data/ directory
15
+ model_path = '/mnt/data/models/Bajiyo/Named_entity_transliteration_malayalam/best_model.h5'
16
+
17
  # Load your custom Keras model
18
+ model = load_model(model_path)
19
  tokenizer = source_tokenizer
20
 
21
  # Function for transliteration