{"id":19408285,"url":"https://github.com/vivshaw/shakespeare-lstm","last_synced_at":"2025-08-21T09:07:55.226Z","repository":{"id":87614003,"uuid":"81047949","full_name":"vivshaw/shakespeare-LSTM","owner":"vivshaw","description":"a Keras neural network trained to write Shakespearean sonnets, with a Flask web interface","archived":false,"fork":false,"pushed_at":"2017-02-10T14:26:32.000Z","size":5705,"stargazers_count":20,"open_issues_count":1,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-24T09:41:14.959Z","etag":null,"topics":["flask","generative-art","keras","lstm","neural-network","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vivshaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-06T04:32:53.000Z","updated_at":"2025-03-21T16:06:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"52f327da-2f22-41ef-a3cf-1851c0396714","html_url":"https://github.com/vivshaw/shakespeare-LSTM","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vivshaw/shakespeare-LSTM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivshaw%2Fshakespeare-LSTM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivshaw%2Fshakespeare-LSTM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivshaw%2Fshakespeare-LSTM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivshaw%2Fshakespeare-LSTM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vivshaw","download_url":"https://codeload.github.com/vivshaw/shakespeare-LSTM/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vivshaw%2Fshakespeare-LSTM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271455211,"owners_count":24762701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","generative-art","keras","lstm","neural-network","tensorflow"],"created_at":"2024-11-10T12:05:50.977Z","updated_at":"2025-08-21T09:07:55.220Z","avatar_url":"https://github.com/vivshaw.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shakespeare-LSTM\n\n![Robot Shakespeare](https://vivshaw.github.io/images/robot-shakespeare-teaser.png)\n\na Keras neural network trained to write Shakespearean sonnets, with an [interactive Flask interface](http://robot-shakespeare.herokuapp.com/).\n\n## Requirements\n\n```\npip install tensorflow\npip install keras\npip install h5py\npip install Flask\npip install Flask-wtf\npip install gunicorn\n```\n\n## Training the network\n\n```\npython network/train.py\n```\n\nThe weights will be checkpointed as hdf5 files with the format `weights-{epoch:02d}-{loss:.3f}.hdf5` and the model will be dumped as `model.yaml`. If you wish to use a different corpus, just drop it in \u0026 edit `network/train.py`.\n\n## Generating text\nEdit `network/generate.py` to use your new weights and model if desired, then:\n\n```\npython network/generate.py\n```\n\n## Typical output \n\n```\nake thee of thy sweet self dost see,\nFrom heaven thee, as the beauty of thy didge?\nThen were thou art my love whose soor coll, and she vounes,\nThat in my stars in his praise the ever wor,\nWhose whould his spiret the deser thee is bart,\n  And thou thy self dost thou mayst live in thee\n  Then do I not the wrose to deepile lease.\n\nThe worthous shalt be bland nor my seas,\nWith pentter than the owness doth bear,\nWhere that beauty like of many a forming.\nThou art as find in that which the thing thee,\n```\n\n## Running the Flask app\n\n```\npython run-flask.py\n```\n\nIf you wish to use different weights and model than I did, put them in `app/static/model.yaml` and `app/static/weights.hdf5`\n\n## Heroku deployment\n\nShould be as easy as:\n\n```\nheroku create\ngit push heroku master\n```\n\nYou may need to `heroku ps:scale web=1` if it doesn't do so automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivshaw%2Fshakespeare-lstm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvivshaw%2Fshakespeare-lstm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvivshaw%2Fshakespeare-lstm/lists"}