项目作者: pasmod

项目描述 :
Automatic Farsi Poem Generation
高级语言: Python
项目地址: git://github.com/pasmod/masnavi.git
创建时间: 2016-11-23T15:29:24Z
项目社区:https://github.com/pasmod/masnavi

开源协议:Apache License 2.0

下载


Manavi: Automatic Poem Generation

license

Masnavi is a tool to automatically generate poems in Farsi. It uses a character based language model trained using a recurrent neural network on lots of Farsi poems. The tool produces poems in the Manavi style. For more information on Masnavi click here.

How to Train

For training you need probably a GPU. To train the network use the following command:

  1. THEANO_FLAGS=device=gpu,floatX=float32 python masnavi/train.py

You might need to use gpu0 or gpu1 instead of gpu.

Why is the training processs not dockerized?

For training the network I used the HPC system of the university of Düseldorf (HILBERT). Unfortunately, docker could not be installed on the cluster (due to some crezy technical reasons!). Keep in mind that for training you need to install the dependencies listed in requirements.txt.

How to Start the App

The project has also a very simplistic web application to ease the use. Use the following commands to start the application locally:

  1. make build
  2. make start

Now the web application runs as daemon in background. Simply point your browser to http://localhost:5000/ to use the app. Notice that processing a poem generation request may take up to 30 seconds. Be patient!

ToDos

  • Processing poem generation requests takes up to 30 seconds. Show the user a message that we are processing the request and the app is not crashed!