Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,18 +3,10 @@ from huggingface_hub import from_pretrained_keras
|
|
3 |
|
4 |
# Load the model from Hugging Face Hub
|
5 |
model = from_pretrained_keras("Bajiyo/ml-en-transliteration")
|
6 |
-
|
7 |
-
import gradio as gr
|
8 |
-
|
9 |
# Load the saved model and tokenizers
|
10 |
import json
|
11 |
-
from keras.models import load_model
|
12 |
from keras.preprocessing.sequence import pad_sequences
|
13 |
|
14 |
-
# Load the saved model
|
15 |
-
model_path = "/content/drive/MyDrive/hugging_final/model"
|
16 |
-
model = load_model(model_path)
|
17 |
-
|
18 |
# Load tokenizer configurations
|
19 |
source_tokenizer_path = "https://huggingface.co/Bajiyo/ml-en-transliteration/blob/main/source_tokenizer.json"
|
20 |
with open(source_tokenizer_path, "r") as f:
|
|
|
3 |
|
4 |
# Load the model from Hugging Face Hub
|
5 |
model = from_pretrained_keras("Bajiyo/ml-en-transliteration")
|
|
|
|
|
|
|
6 |
# Load the saved model and tokenizers
|
7 |
import json
|
|
|
8 |
from keras.preprocessing.sequence import pad_sequences
|
9 |
|
|
|
|
|
|
|
|
|
10 |
# Load tokenizer configurations
|
11 |
source_tokenizer_path = "https://huggingface.co/Bajiyo/ml-en-transliteration/blob/main/source_tokenizer.json"
|
12 |
with open(source_tokenizer_path, "r") as f:
|