Skip to content

Instantly share code, notes, and snippets.

@JupyterJones
Created October 23, 2018 00:06
Show Gist options
  • Save JupyterJones/90427d9f6e320c401174a898f690e845 to your computer and use it in GitHub Desktop.
Save JupyterJones/90427d9f6e320c401174a898f690e845 to your computer and use it in GitHub Desktop.
A script created for viewing text created with Char-rnn
#!/bin/bash
# A script created for viewing text created with Char-rnn
# https://github.com/karpathy/char-rnn
# this script turns the last file in dirctory "cv" into a variable fn
fn=$(ls -rt1 cv | tail -1)
# Below this runs the command:
# th sample.lua on the last file created in the directory 'cv'
# and primes it with the text entered after answer :
# The -gpuid -1 means no GPU is used just a CPU
# Actual use Example:
# ./answer.sh "Where is the king"
th sample.lua cv/$fn -primetext "$1" -gpuid -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment