AI4Bharat / IndicXlit

Transliteration models for 21 Indic languages
https://ai4bharat.iitm.ac.in/transliteration
MIT License
76 stars 21 forks source link

Colab code not running #1

Closed SaiKeshav closed 2 years ago

SaiKeshav commented 2 years ago

Hi,

Thanks a lot for sharing the great work! The shared colab link fails in the last cell with the following error:

ImportError                               Traceback (most recent call last)
[<ipython-input-4-f601442c8fb6>](https://localhost:8080/#) in <module>()
      1 from datetime import datetime
----> 2 import xlit_translit
      3 
      4 num_suggestions = 10
      5 

1 frames
[/content/IndicXlit/inference/python/custom_interactive.py](https://localhost:8080/#) in <module>()
     21 import torch
     22 
---> 23 from fairseq import checkpoint_utils, distributed_utils, options, tasks, utils
     24 from fairseq.dataclass.configs import FairseqConfig
     25 from fairseq.dataclass.utils import convert_namespace_to_omegaconf

ImportError: cannot import name 'checkpoint_utils' from 'fairseq' (unknown location)

This occurs presumable due to a difference in the version of fairseq. The code by default uses the latest fairseq code in Github, which may have changed from the time this was tested at your end. Could you please check this?

Thanks, Keshav

GokulNC commented 2 years ago

Can you try using our latest library: https://pypi.org/project/ai4bharat-transliteration/1.0.0/

GokulNC commented 2 years ago

Please let us know if you are still facing this issue. Closing it for now. Thanks!