MrBananaHuman / KoGPT2ForParaphrasing

TEMP
35 stars 5 forks source link

Code Execution Example #2

Open hkw0430 opened 3 years ago

hkw0430 commented 3 years ago

Hello! I saw the data posted on github!

Could you tell me how I can see what you showed me on the sample at readme.md?

Thank you :)

MrBananaHuman commented 3 years ago

Hello! :-)

this is test script

python3 interact.py --model=gpt2 --model_checkpoint=sample_model/pytorch_kogpt2_676e9bcfa7.params/pytorch_model.bin

When you enter this script in terminal, you can write Korean text as input with ">>>" symbol.

hkw0430 commented 3 years ago

I tried to run it in a terminal window with your answer, but the error occurred! Currently, I downloaded and extracted the sample model folder you shared with Google Drive to the directory created through git clone!

I'd appreciate it if you could tell me how to solve it!

****error message**** Traceback (most recent call last): File "interact.py", line 19, in from train import SPECIAL_TOKENS, build_input_from_segments_inference, add_specialtokens File "/Users/KoGPT2ForParaphrasing/train.py", line 34, in tokenizer = MyTokenizer(vocab_file_path) File "/Users/KoGPT2ForParaphrasing/new_tokenizer.py", line 12, in init self.tokenizer = SentencepieceTokenizer(vocab_file_path) File "/Users/opt/anaconda3/lib/python3.8/site-packages/gluonnlp/data/transforms.py", line 542, in init super(SentencepieceTokenizer, self).init(path) File "/Users/opt/anaconda3/lib/python3.8/site-packages/gluonnlp/data/transforms.py", line 494, in init self._processor.Load(path) File "/Users/opt/anaconda3/lib/python3.8/site-packages/sentencepiece/init.py", line 367, in Load return self.LoadFromFile(model_file) File "/Users/opt/anaconda3/lib/python3.8/site-packages/sentencepiece/init.py", line 171, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) OSError: Not found: "model/kogpt2_news_wiki_ko_cased_818bfa919d.spiece": No such file or directory Error #2

abimarticio commented 2 years ago

Hi @hkw0430! I encountered the same error. May I ask if you found a way to fix this?