Instructions to use sajalkuikel/eng-to-hindi-seq2seq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use sajalkuikel/eng-to-hindi-seq2seq with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://sajalkuikel/eng-to-hindi-seq2seq") - Notebooks
- Google Colab
- Kaggle
English -> Hindi Seq2Seq Translation (LSTM Encoder-Decoder)
A word-level LSTM encoder-decoder trained on a Hindi-English parallel corpus.
Files
eng_to_hindi_seq2seq.keras- full training model (encoder + decoder combined)encoder_model.keras/decoder_model.keras- inference-ready encoder/decodereng_tokenizer.pkl/hin_tokenizer.pkl- KerasTokenizerobjects (pickled)model_config.pkl- dict withmax_length_eng,max_length_hin,latent_dim
Usage
import pickle, numpy as np, tensorflow as tf
from huggingface_hub import hf_hub_download
repo_id = "sajalkuikel/eng-to-hindi-seq2seq"
encoder_model = tf.keras.models.load_model(hf_hub_download(repo_id, "encoder_model.keras"))
decoder_model = tf.keras.models.load_model(hf_hub_download(repo_id, "decoder_model.keras"))
eng_tokenizer = pickle.load(open(hf_hub_download(repo_id, "eng_tokenizer.pkl"), "rb"))
hin_tokenizer = pickle.load(open(hf_hub_download(repo_id, "hin_tokenizer.pkl"), "rb"))
config = pickle.load(open(hf_hub_download(repo_id, "model_config.pkl"), "rb"))
See the linked Space for a live demo with full inference code.
- Downloads last month
- 443