Skip to content

Instantly share code, notes, and snippets.

@b0noI
Last active July 6, 2018 02:07
Show Gist options
  • Select an option

  • Save b0noI/92fb37fb0e7fda12c7d5425a4367059e to your computer and use it in GitHub Desktop.

Select an option

Save b0noI/92fb37fb0e7fda12c7d5425a4367059e to your computer and use it in GitHub Desktop.
cd ~
cd nmt
touch ~/content/output
chat () {
echo $1 > ~/content/input
python3 $HOME/pre_processing.py ~/content/input >~/content/input.pre
$HOME/subword-nmt/apply_bpe.py -c $HOME/code.bpe --vocabulary $HOME/vocab.train.bpe.a --vocabulary-threshold 5 < ~/content/input.pre > `/content/input.pre.bpe
cd $HOME/nmt
python -m nmt.nmt --out_dir=~/content/nmt_model --inference_input_file=~/content/input.pre.bpe --inference_output_file=~/content/output > /dev/null 2>&1
cat ~/content/output
}
chat "hi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment