Skip to content

MBTI Translator (나는 오늘 어떤 MBTI처럼 살았을까?)

Notifications You must be signed in to change notification settings

ethHong/text_mbti

Repository files navigation

Text to MBTI (Zero Shot - model)

😄 For fun: MBTI Translator - Infer probable MBTI from your sentence, using zero-shot NLI model.

About the project & Examples

  • Please give a sentence as a input
  • If possible, give a sentence which could imply your 'type' indicator

Example of input & output:

Input: "I stayed home all day"

===

Output:

You are:  ISFP
Ratio {'E': 27.338588094108168, 'I': 72.66141190589182} {'N': 22.149243913056992, 'S': 77.85075608694301} {'T': 46.17274433748438, 'F': 53.82725566251562} {'P': 57.30466611213056, 'J': 42.69533388786944}
Input: "I'm making plans for my trip to Osaka. I'm so excited!"

===

Output:

You are:  ESTJ
Ratio {'E': 71.53464326345417, 'I': 28.46535673654582} {'N': 35.33135528913844, 'S': 64.66864471086156} {'T': 58.70273162646018, 'F': 41.29726837353982} {'P': 46.96476087995551, 'J': 53.03523912004449}

Model and requirements

  • Model: https://huggingface.co/facebook/bart-large-mnli
  • Using Zero-shot text classification model
  • required to setup torch & transformer library. Pleaase setup virtual environment
  • 02.20 update: Highly recommend using requirement.txt to enable frontend UI using streamlit

pip install -r requirements.txt
pip install transformers

Module Description

  • Zero-shot text classification model get texts & set of labels as input
  • It outputs probability of the text is related to each of the labels

About

MBTI Translator (나는 오늘 어떤 MBTI처럼 살았을까?)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published