Coder Social home page Coder Social logo

hackerspace-pesu / deep-frost Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 7.0 72.02 MB

A poem generator based on text generation using GRU

Home Page: https://deep-frost.herokuapp.com/

Python 50.64% HTML 31.53% CSS 17.83%
gru hacktoberfest keras poem-generator pronouncing python python3 tensorflow text-generation

deep-frost's People

Contributors

aditeyabaral avatar chakita avatar devanaggarwal avatar inacior avatar mayank1403 avatar raaahuuulll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

deep-frost's Issues

Change of GUI

This project currently uses PyQt5 for GUI, we would like to use flask for the GUI instead, to host the model.
The GUI should contain two text boxes: one for the user to enter the rhyming scheme and another for them to enter the first line. It should also contain a button Generate which should display the poem on clicking. The new GUI should provide all the functionality of the existing one.

The GUI at present looks as follows:
Screenshot from 2020-06-21 13-36-18

Crashes when last word is not in vocabulary

The Issue

I tested the app a bit and noticed that I get status 500: Internal Server Error on certain inputs.

Some of the inputs:
Rhyme scheme: AABBAABB

First line: i walk a lonely askdh (crashes)

First line: i walk a askldhsal road (does NOT crash)

First line: I have much stonks (crashes)

Details

The error is: KeyError: "word 'askdh' not in vocabulary"

And occurs at line 61 here:

deep-frost/src/app.py

Lines 60 to 62 in dea2405

rhyming_words = pronouncing.rhymes(first_end_word)
most_sim = list(word_model.most_similar(first_end_word))
for word, prob in most_sim:

Probable Solution

One solution would be to wrap that line in a try-except (or use if word in word_vec.vocab:) and return an error to the front-end stating that the last word of the sentence could not be found in the vocabulary.

Another solution would be to skip that last word and consider the second last word, and if that fails, the third last word... and so on.

Ofcourse the best solution would be to use a character-based model or token-based (using a tokenizer such as PTB tokenizer) model, but that would need quite a bit of re-factoring and more resources for training.

[Feature] Add option for length of the poem

Currently the poem generator generates the poem based on length of the rhyming scheme

It could be useful if a option was provided allowing the user to select number of lines in the poem

Improve GUI

Improve the existing GUI by adding styles and theme to make it look modern. No changes in functionality of the GUI is required, only improve the style of the existing GUI.

Responsive GUI

The GUI would be better if made responsive for mobile devices!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.