8000 GitHub - ceverha/poem: Generate Topical Poems
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ceverha/poem

 
 

Repository files navigation

Hafez: an Interactive Poetry Generation System

This is the code for the whole pipeline and web interface described in Hafez: an Interactive Poetry Generation System.

For Rhyme Generation Code, please find it here For RNN with FSA decoding code, please find it here

Setup the web server:

You need a server with GPU and CUDA 8.0 installed.

  1. Unzip the RNN model files in models: Due to the model's large size (more than 1GB), please contact shixing19910105@gmail.com for the pretrained models.
cd models
gunzip lyrics.tl.nn.gz
gunzip lyrics.tl.topdown.nn
  1. Copy the rhyme generation code into the folder sonnet-project-for-server/
cd sonnet-project-for-server
git clone https://github.com/Marjan-GH/Topical_poetry
  1. Follow the instruction to start the server for Rhyme Generation.
  2. Start the RNN server:
cd sh
# start the normal server
bash run_server.sh
# start the interactive server
bash run_server_interactive.sh
  1. (Optional) You need to register a google clound datastore to log all the poems generated by the system.
  2. Start the web server: If you didn't follow step 4, you may need to comments the related lines in py/client.py. (Happy Debugging !) Change the host in py/client.py to reflect your host address, Then run:
cd sh
bash run_client.sh
  1. Go to folder jekyll/poem/data/js/, for each javascript file, locate the variable api_host and change to your host server address. By default, we will use port 8080 for all our API call.
  2. Build the webpage:
cd jekyll/poem
jekyll build

Then the built web pages are in jekyll/poem/_site/

Any questions, please contact Xing Shi

About

Generate Topical Poems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 42.1%
  • JavaScript 33.3%
  • HTML 14.2%
  • Shell 8.7%
  • CSS 1.2%
  • Roff 0.5%
0