indicTrans
indicTrans copied to clipboard
Model only works inside the indicTrans folder.
Hi, I did the setup as explained in python inference demo colab notebook. It happened properly. However, the model only works inside the indicTrans folder. Accessing it from anywhere outside results in ModuleNotFoundErrors or FileNotFoundErrors.
ModuleNotFoundError: No module named 'indicTrans'
I had a FastAPI backend where I needed to access the model outside indicTrans but its not working. The code I tried is given below:
import sys
sys.path.append(path_to_indictrans_folder)
from indicTrans.inference.engine import Model
indic2en_model = Model(expdir='../indic-en')
[Same code without sys.path.append works inside indicTrans]
Is there any mistake in accessing the model using this code or is there any other approach?
OS Used: Linux Mint