DL-Simplified icon indicating copy to clipboard operation
DL-Simplified copied to clipboard

[Project Addition]: Poem Generator using DL

Open Madhusri02 opened this issue 1 year ago • 13 comments

Deep Learning Simplified Repository (Proposing new issue)

:red_circle: Project Title : Poem generator :red_circle: Aim : To generate poem from a dataset of poems :red_circle: Dataset : Poems.txt :red_circle: Approach : Using LSTM and 3 layers of neural networks.


:white_check_mark: To be Mentioned while taking the issue :

  • Full name : Madhu Sri
  • GitHub Profile Link : https://github.com/Madhusri02
  • Email ID : [email protected]
  • What is your participant role? (GSSOC ' 24) Contibutor

Madhusri02 avatar May 20 '24 02:05 Madhusri02

Can you share the source of the dataset (URL) and a brief on the approach @Madhusri02

abhisheks008 avatar May 20 '24 06:05 abhisheks008

  1. Data Preparation: The collection of poems stored in a file called “poem.txt.” We read each line of the poems and create a list to store them.
  2. Tokenization: Create a Tokenizer to learn the words in the poems. The tokenizer assigns a unique number to each word (like giving each word a secret code).
  3. Creating N-Grams: Then , slide a window over the words to create a small group of words (called an “n-gram”). These n-grams help our model understand the structure and flow of the poems.
  4. Building the Model: This model consist of three layers . Embedding Layer: Converts word indices to dense vectors (like translating words into a secret language). Bidirectional LSTM Layer : This layer remembers patterns in the poems (like remembering a song’s melody both forwards and backwards). Dense Layer : Predicts the next word in the poem (like guessing the next word in a sentence). 5)Training the Model: Then we can train our model using the input sequences (the n-grams) and their corresponding labels (the next words). After several rounds of practice (epochs of 40), our model gets better at creating new poems.

dataset can be used from : https://www.kaggle.com/datasets/michaelarman/poemsdataset Usages How this Model helps :

Content Creation : Blogs and Websites , Social Media Personalized Marketing : Marketers can send personalized poems to subscribers during special occasions or holidays. Creative Writing : Students can use this tool to explore language nuances and improve their writing skills.

Madhusri02 avatar May 21 '24 13:05 Madhusri02

Need to implement at least 2-3 deep learning methods for this dataset. Compare them based on the accuracy scores and conclude the best fitted model for this project. Can share your approach mentioning the other methods you are planning to implement?

@Madhusri02 looking forward to hearing from you.

abhisheks008 avatar May 21 '24 15:05 abhisheks008

Sure @abhisheks008 , The approches can be done with the following ways : LSTM Networks (Suitable for tasks with strong sequential dependencies, providing a balance between complexity and performance) , GRU Networks: (An alternative to LSTMs that can offer faster training times while still handling sequence data effectively.) , Transformer Models i.e, GPT-3 ( Best for capturing long-range dependencies and generating high-quality, creative text, though they require more computational power and resources. It is like fine creating a model with fine tuning the existing algorithms based on the dataset) .

With these approches, I have implemented LSTM network and got accuracy level of about 81% . I will work on other two approches and make a pr to this issue. So kindly assign this project to me , so that I can work on this project.

Madhusri02 avatar May 21 '24 17:05 Madhusri02

Hello @abhisheks008 I am a GsSOC'24 contributor and I would like to work on this issue. Can you please assign it to me?

khushi-igupta avatar May 21 '24 17:05 khushi-igupta

Sure @abhisheks008 , The approches can be done with the following ways : LSTM Networks (Suitable for tasks with strong sequential dependencies, providing a balance between complexity and performance) , GRU Networks: (An alternative to LSTMs that can offer faster training times while still handling sequence data effectively.) , Transformer Models i.e, GPT-3 ( Best for capturing long-range dependencies and generating high-quality, creative text, though they require more computational power and resources. It is like fine creating a model with fine tuning the existing algorithms based on the dataset) .

With these approches, I have implemented LSTM network and got accuracy level of about 81% . I will work on other two approches and make a pr to this issue. So kindly assign this project to me , so that I can work on this project.

Assigned @Madhusri02

abhisheks008 avatar May 22 '24 04:05 abhisheks008

Hello @abhisheks008 I am a GsSOC'24 contributor and I would like to work on this issue. Can you please assign this to me ?

Pranali3103 avatar May 23 '24 12:05 Pranali3103

Hello @abhisheks008 I am a GsSOC'24 contributor and I would like to work on this issue. Can you please assign this to me ?

This issue is already assigned.

abhisheks008 avatar May 23 '24 13:05 abhisheks008

Hello @abhisheks008 ! I have completed this issue , but when I try to clone this repo after fork , I am getting an error as : error: RPC failed; curl 18 transfer closed with outstanding read data remaining error: 7130 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output

Madhusri02 avatar May 30 '24 16:05 Madhusri02

Hello @abhisheks008 ! I have completed this issue , but when I try to clone this repo after fork , I am getting an error as : error: RPC failed; curl 18 transfer closed with outstanding read data remaining error: 7130 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output

@sitamgithub-MSIT @thevirengarg please help @Madhusri02

abhisheks008 avatar May 31 '24 03:05 abhisheks008

error: RPC failed; curl 18 transfer closed with outstanding read data remaining error: 7130 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output

Here is a detailed stackoverflow guide for your problem: https://stackoverflow.com/questions/38618885/error-rpc-failed-curl-transfer-closed-with-outstanding-read-data-remaining

sitammeur avatar May 31 '24 19:05 sitammeur

One solution is to make changes to the codespace, which would be beneficial! Create a codespace from your fork, then a branch, and finally make your desired changes and submit a PR. Similar to what you must do in your local environment, because you are using codespace, this error should not occur.

cc: @Madhusri02

sitammeur avatar May 31 '24 19:05 sitammeur

Hello @abhisheks008 ! I have completed this issue , but when I try to clone this repo after fork , I am getting an error as : error: RPC failed; curl 18 transfer closed with outstanding read data remaining error: 7130 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output

@Madhusri02 This issue could be due to network interruptions or an unstable internet connection. Instead of using commands, you could use VS Code's shortcuts to clone the repository. Additionally, make sure your fork is up to date.

thevirengarg avatar May 31 '24 19:05 thevirengarg