Skip to content

Latest commit

 

History

History
54 lines (48 loc) · 1.81 KB

README.md

File metadata and controls

54 lines (48 loc) · 1.81 KB

Text2Emoji ☺️

Emoji Representative Text2Emoji is a text classification model trained on 200 sentences across 5 classes. Below fig. shows the list of emoji's on which the model is trained on. Text to the side represents a high-level emotion that the emoji depicts. 😎

Steps to Run

  1. $> python3 main.py
  2. Open emoji.html in the browser and start typing 💬

Demo

Text2Emoji Demo

Methodology

Flair Internal

Model Architecture

Model: "TextClassifier(
  (document_embeddings): DocumentRNNEmbeddings(
    (embeddings): StackedEmbeddings(
      (list_embedding_0): WordEmbeddings('glove')
      (list_embedding_1): FlairEmbeddings(
        (lm): LanguageModel(
          (drop): Dropout(p=0.05, inplace=False)
          (encoder): Embedding(300, 100)
          (rnn): LSTM(100, 2048)
          (decoder): Linear(in_features=2048, out_features=300, bias=True)
        )
      )
      (list_embedding_2): FlairEmbeddings(
        (lm): LanguageModel(
          (drop): Dropout(p=0.05, inplace=False)
          (encoder): Embedding(300, 100)
          (rnn): LSTM(100, 2048)
          (decoder): Linear(in_features=2048, out_features=300, bias=True)
        )
      )
      (list_embedding_3): ELMoEmbeddings(model=elmo-medium)
    )
    (word_reprojection_map): Linear(in_features=5732, out_features=256, bias=True)
    (rnn): LSTM(256, 512)
    (dropout): Dropout(p=0.5, inplace=False)
  )
  (decoder): Linear(in_features=512, out_features=5, bias=True)
  (loss_function): CrossEntropyLoss()
)"

Technologies Used

  1. Flask
  2. Flair
  3. HTML/Bootstrap
  4. Js