# Project export: MBTIFY

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 10.0
- Tagline: Leverages advanced Natural Language Processing and Machine Learning technologies to administer streamlined and adaptive MBTI personality tests through fewer than 10 short-answer questions.
- Devpost: https://devpost.com/software/mbtify
- GitHub: https://github.com/YXKelvinHuang/InsightCare.git
- Demo: https://www.kaggle.com/datasets/anshulmehtakaggl/60k-responses-of-16-personalities-test-mbt/data
- Result: winner (Best Use of InterSystems IntegratedML)
- Team: 2 GitHub contributor(s) — Kelvin Huang (5 commits), zac (1 commits)

## Devpost submission (written by the team)

### Inspiration

Frustrated by the traditional MBTI's barrage of questions? So were we. Introducing MBTIFY: our web application streamlines your MBTI assessment using advanced Natural Language Processing and Machine Learning. Forget the indecision of Likert scales; MBTIFY's conversational AI prompts you with tailored, open-ended questions. Answer naturally—the AI adapts, selecting queries to pinpoint your personality type with ease. Welcome to a smarter, streamlined path to self-discovery.

### What it does

MBTIFY is a web application designed to administer MBTI personality tests in a more efficient and streamlined manner. Unlike traditional MBTI tests that require answering hundreds of questions, MBTIFY aims to achieve accurate results with fewer than 10 short-answer questions. Users can respond to these questions via text or audio input. The application leverages Natural Language Processing (NLP) and Machine Learning (ML) technologies to analyze the answers and determine the user's MBTI type.

### How we built it

Frontend: Reflex for a user-friendly interface. Voice Recognition: Converts spoken answers to text. NLP: Cohere and OpenAI analyze responses for emotional and syntactic insights. ML: Intersystems IntegratedML utilizes 60,000+ Kaggle MBTI questionnaire responses to train a predictive AutoML model. This model interprets Likert scale responses, determining MBTI type with a confidence level. Immediate results are provided if a confidence threshold is met, or the system dynamically selects further clarifying questions.

### Challenges we ran into

Reflex on M1 Macs: Faced compatibility issues with the Reflex UI framework on M1 chipset Macs, requiring optimization for cross-platform functionality. SQLAlchemy with sqlalchemy-iris: Experienced limitations in integrating SQLAlchemy with the sqlalchemy-iris dialect, leading to custom code solutions for effective database operations. IRIS Cloud Connectivity: Encountered difficulties in connecting to the IRIS cloud server, necessitating adjustments in network and security settings for reliable deployment. Model Training Time: The machine learning model training took over 6 hours due to the large dataset and complex algorithms, prompting a need for pipeline optimization to enhance efficiency.

### Accomplishments we're proud of

Responsive Design: Developed with Reflex for an adaptive user experience. Real-Time ML Analysis: Intersystems algorithms provide instant MBTI prediction with a confidence indicator using SQL. We infer Likert scores from user responses to our conversational prompts using LLM, then input these as features into our predictive model, thereby combining discriminative with generative AI models. Smart Questioning: A dynamic question bank evolves based on user inputs, distinguishing similar MBTI profiles through adaptive questioning and iterative model refinements with updated scores.

### What we learned

Stay on Track: Consistently ensure that you are on the right path by periodically reviewing your goals and progress. Purposeful Implementation: Before committing to a new feature or task, evaluate its significance to avoid exerting effort on non-impactful activities.

### What's next

Audio Transcribing: Our roadmap includes the implementation of an advanced audio transcribing feature. This will allow us to extend our voice recognition capabilities to capture even more nuanced responses from users, further refining our MBTI analysis. Emotion Detection with HumeAI: We plan to integrate HumeAI technology for real-time emotion detection based on the user's voice. This will add an additional layer of depth to the analysis, enabling us to distinguish between closely matched MBTI types with a greater degree of accuracy. Optimized Machine Learning Algorithms: We aim to continually fine-tune our existing machine learning models within Intersystem to accommodate these new features, ensuring that our confidence levels and MBTI type predictions are as accurate as possible. Dynamic Questioning 2.0: Building on our adaptive questioning framework, we will incorporate feedback loops that consider not only the content of the user’s responses but also the detected emotional tone. This will make our question selection even more responsive and targeted.

## README (from the GitHub repository)

# MBTIFY
A web application that leverages advanced Natural Language Processing and Machine Learning technologies to administer streamlined and adaptive MBTI personality tests through fewer than 10 short-answer questions.

## Inspiration
Frustrated by the traditional MBTI's barrage of questions? So were we. Introducing MBTIFY: our web application streamlines your MBTI assessment using advanced Natural Language Processing and Machine Learning. Forget the indecision of Likert scales; MBTIFY's conversational AI prompts you with tailored, open-ended questions. Answer naturally—the AI adapts, selecting queries to pinpoint your personality type with ease. Welcome to a smarter, streamlined path to self-discovery.

## What it does
MBTIFY is a web application designed to administer MBTI personality tests in a more efficient and streamlined manner. Unlike traditional MBTI tests that require answering hundreds of questions, MBTIFY aims to achieve accurate results with fewer than 10 short-answer questions. Users can respond to these questions via text or audio input. The application leverages Natural Language Processing (NLP) and Machine Learning (ML) technologies to analyze the answers and determine the user's MBTI type.

## How we built it
Frontend: Reflex for a user-friendly interface.

Voice Recognition: Converts spoken answers to text.

NLP: Cohere and OpenAI analyze responses for emotional and syntactic insights.

ML: Intersystems IntegratedML utilizes 60,000+ Kaggle MBTI questionnaire responses to train a predictive AutoML model. This model interprets Likert scale responses, determining MBTI type with a confidence level. Immediate results are provided if a confidence threshold is met, or the system dynamically selects further clarifying questions.


## Challenges we ran into
Reflex on M1 Macs: Faced compatibility issues with the Reflex UI framework on M1 chipset Macs, requiring optimization for cross-platform functionality.

SQLAlchemy with sqlalchemy-iris: Experienced limitations in integrating SQLAlchemy with the sqlalchemy-iris dialect, leading to custom code solutions for effective database operations.

IRIS Cloud Connectivity: Encountered difficulties in connecting to the IRIS cloud server, necessitating adjustments in network and security settings for reliable deployment.

Model Training Time: The machine learning model training took over 6 hours due to the large dataset and complex algorithms, prompting a need for pipeline optimization to enhance efficiency.

## Accomplishments that we're proud of
Responsive Design: Developed with Reflex for an adaptive user experience.

Real-Time ML Analysis: Intersystems algorithms provide instant MBTI prediction with a confidence indicator using SQL. We infer Likert scores from user responses to our conversational prompts using LLM, then input these as features into our predictive model, thereby combining discriminative with generative AI models.

Smart Questioning: A dynamic question bank evolves based on user inputs, distinguishing similar MBTI profiles through adaptive questioning and iterative model refinements with updated scores.

## What we learned
Stay on Track: Consistently ensure that you are on the right path by periodically reviewing your goals and progress.

Purposeful Implementation: Before committing to a new feature or task, evaluate its significance to avoid exerting effort on non-impactful activities.

## What's next for MBTIFY
Audio Transcribing: Our roadmap includes the implementation of an advanced audio transcribing feature. This will allow us to extend our voice recognition capabilities to capture even more nuanced responses from users, further refining our MBTI analysis.

Emotion Detection with HumeAI: We plan to integrate HumeAI technology for real-time emotion detection based on the user's voice. This will add an additional layer of depth to the analysis, enabling us to distinguish between closely matched MBTI types with a greater degree of accuracy.

Optimized Machine Learning Algorithms: We aim to continually fine-tune our existing machine learning models within Intersystem to accommodate these new features, ensuring that our confidence levels and MBTI type predictions are as accurate as possible.

Dynamic Questioning 2.0: Building on our adaptive questioning framework, we will incorporate feedback loops that consider not only the content of the user’s responses but also the detected emotional tone. This will make our question selection even more responsive and targeted.


## Detected evidence (automated analysis)

Indexed codebase: 18 recognized source files, 48 KB.
- Python (language) — detected in the code
- Cohere (technology) — claimed on Devpost, not found in the code
- OpenAI (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (20 of 20)

```
.gitignore
README.md
requirements.txt
rxconfig.py
test/__init__.py
test/components/__init__.py
test/components/logo.py
test/components/sidebar.py
test/intersystems_backend.py
test/pages/__init__.py
test/pages/about.py
test/pages/dashboard.py
test/pages/index.py
test/pages/question.py
test/pages/settings.py
test/state.py
test/styles.py
test/templates/__init__.py
test/templates/template.py
test/test.py
```

### Dependencies

- requirements.txt: reflex@==0.3.1

### Recent commits (newest first)

- Intersystems prediction
- Update README.md
- Update README.md
- implementation done
- self.question
- initial commit

## Key source files (fetched from GitHub, selected and truncated for size)

### requirements.txt

```

reflex==0.3.1

```

### test/pages/index.py

```python
"""The home page of the app."""

from test import styles
from test.templates import template
from test.state import State

import reflex as rx
color = "rgb(107,99,246)"
# def title() -> rx.Component:
#     return rx.button("",
#                 rx.text("Welcome to InsightCare"),
#                   bg = "lightblue",
#                   )
    # rx.text("Hello World!", color="blue", font_size="1.5em")

def logo() ->rx.Component:
    return rx.image(src="/logo22.png", width="13em",
                    style={
                        'position': 'fixed',
                        'left': '0',
                        'bottom': '600',
                    })

def aboutus() ->rx.Component:
    return rx.image(src="/aboutus.png", width="7em",
                    style={
                        'position': 'fixed',
                        'right': '300',
                        'bottom': '600',
                    })

def qa(question: str, answer: str) -> rx.Component:
    return rx.box(
        rx.box(
            rx.text(question, style=styles.question_style),
            text_align="right",
        ),
        rx.box(
            rx.text(answer, style=styles.answer_style),
            text_align="left",
        ),
    )


def chat() -> rx.Component:
    qa_pairs = [
        (
            "What is MBTIfy?",
            "Discover your true self with MBTIfy—our quick, intuitive test provides instant MBTI insights for a deeper understanding of you.",
        ),
        (
            "What can I make with it?",
            "Click on the 'Begin your journey!' button and send 'Start!' to Chatbot beginning your MBTI test.",
        ),
    ]
    return rx.box(
        *[
            qa(question, answer)
            for question, answer in qa_pairs
        ],
        style={
            'position': 'fixed',
            'right': '10',
            'bottom': '200',
            'z_index': '1000',  # Optional, to make sure it's above other elements
        }
    )


def action_bar() -> rx.Component:
    return rx.hstack(
        rx.button("", 
                  rx.link("Begin your journey!", 
                          style={
                              'button_style': {
                                  'padding': '15px 30px',
                                  'margin': '10px',
                                  'border-radius': '8px',
                                  'transition': 'all 0.3s ease'
                              },
                              'background_image': "linear-gradient(271.68deg, #EE756A 0.75%, #756AEE 80%)",
                              'background_clip': "text",
                              'font_weight': "bold",
                              'font_size': "1.5em",
                              'hover': {
                                  'transform': 'scale(1.05)',
                                  'box-shadow': '0px 4px 20px rgba(0, 0, 0, 0.1)'
                              }
                          },
                          href="/about")
                  ),
        style={
            'position': 'fixed',
            'right': '125px',
            'bottom': '50px',
            'z_index': '1000',  # Optional, to make sure it's above other elements
        }
    )


# return rx.button(
#         "", 
#         rx.link(rx.image(src="/longlogo2.png",width="41em",length="1000em"), href="/about"),variant="unstyled",
#         style={
#             'position': 'fixed',
#             'left': '0',
#             'bottom': '700',
#             'z_index': '1000',  # Optional, to make sure it's above other elements
#         }
#     )

# def upload()->rx.Component:
#     """The main view."""
#     return rx.vstack(
#         rx.upload(
#             rx.vstack(
#                 rx.button(
#                     "Select File",
#                     color=color,
#                     bg="white",
#                     border=f"1px solid {color}",
#                 ),
#                 rx.text(
#                     "Drag and drop files here or click to select files"
#                 ),
#             ),
#             border=f"1px dotted {color}",
#             padding="5em",
#         ),
#         rx.hstack(rx.foreach(rx.selected_files, rx.text)),
#         rx.button(
#             "Upload",
#             on_click=lambda: State.handle_upload(
#                 rx.upload_files()
#             ),
#         ),
#         rx.button(
#             "Clear",
#             on_click=rx.clear_selected_files,
#         ),
#         # rx.foreach(
#         #     State.img, lambda img: rx.image(src=img)
#         # ),
#         padding="5em",
#         style={
#             'position': 'fixed',
#             'left': '0',
#             'bottom': '50',
#             'z_index': '1000',  # Optional, to make sure it's above other elements
#         }
#     )

#Function
def another_page()-> rx.Component:
    #return rx.link("About page", href="/about")
    return rx.button(
        "", 
        rx.link(rx.image(src="/longlogo22.png",width="30em",length="1000em"), href="/about"),variant="unstyled",
        style={
            'position': 'fixed',
            'left': '0',
            'bottom': '600',
            'z_index': '1000',  # Optional, to make sure it's above other elements
        }
    )

# def upload()-> rx.Component:
#     return rx.fragment(
#         rx.upload(rx.text("Upload files"), rx.icon(tag="upload")),
#         rx.button(on_submit=State.<your_upload_handler>)
#     )

def index() -> rx.Component:
    return rx.container(
        #title(),
        logo(),
        aboutus(),
        chat(),
        another_page(),
        action_bar(),
        # upload(),
    )

# @template(route="/", title="Home", image="/github.svg")
# def index() -> rx.Component:
#     """The home page.

#     Returns:
#         The UI for the home page.
#     """
#     with open("README.md", encoding="utf-8") as readme:
#         content = readme.read()
#     return rx.markdown(content, component_map=styles.markdown_sty
[truncated — 320 more characters]
```

### rxconfig.py

```python
import reflex as rx

config = rx.Config(
    app_name="test",
)
```

### test/__init__.py

```python
"""Base template for Reflex."""

```

### test/test.py

```python
"""Welcome to Reflex!."""

from test import styles
from test.state import State
# Import all the pages.
from test.pages import *

import reflex as rx

from typing import Annotated

from fastapi import FastAPI, File, UploadFile

app = FastAPI()

@app.post("/uploadfile/")
async def create_upload_file(file: UploadFile):
    return {"filename": file.filename}

# accent_color = "#f81ce5"
# style = {
#     "::selection": {
#         "background_color": accent_color,
#     },
#     ".some-css-class": {
#         "text_decoration": "underline",
#     },
#     "#special-input": {"width": "20vw"},
#     # rx.Text: {
#     #     "font_family": styles.SANS,
#     # },
#     rx.Divider: {
#         "margin_bottom": "1em",
#         "margin_top": "0.5em",
#     },
#     rx.Heading: {
#         "font_weight": "500",
#     },
#     rx.Code: {
#         "color": accent_color,
#     },
# }

app = rx.App()
# Add state and page to the app.
# app = rx.App()
app.add_page(index)
# app.add_page(question,route="/question")
app.add_page(about,route="/about")
app.compile()


# # Create the app and compile it.
# app = rx.App(style=styles.base_style)
# app.compile()

```

### test/styles.py

```python
"""Styles for the app."""

import reflex as rx

border_radius = "0.375rem"
box_shadow = "0px 0px 0px 1px rgba(84, 82, 95, 0.14)"
border = "1px solid #F4F3F6"
text_color = "black"
accent_text_color = "#1A1060"
accent_color = "#F5EFFE"
hover_accent_color = {"_hover": {"color": accent_color}}
hover_accent_bg = {"_hover": {"bg": accent_color}}
content_width_vw = "90vw"
sidebar_width = "20em"

template_page_style = {"padding_top": "5em", "padding_x": ["auto", "2em"]}

template_content_style = {
    "width": "100%",
    "align_items": "flex-start",
    "box_shadow": box_shadow,
    "border_radius": border_radius,
    "padding": "1em",
    "margin_bottom": "2em",
}

link_style = {
    "color": text_color,
    "text_decoration": "none",
    **hover_accent_color,
}

overlapping_button_style = {
    "background_color": "#F5EFFE",
    "border": border,
    "border_radius": border_radius,
}

base_style = {
    rx.MenuButton: {
        "width": "3em",
        "height": "3em",
        **overlapping_button_style,
    },
    rx.MenuItem: hover_accent_bg,
}

markdown_style = {
    "code": lambda text: rx.code(text, color="#1F1944", bg="#F5EFFE"),
    "a": lambda text, **props: rx.link(
        text,
        **props,
        font_weight="bold",
        color="#03030B",
        text_decoration="underline",
        text_decoration_color="#AD9BF8",
        _hover={
            "color": "#AD9BF8",
            "text_decoration": "underline",
            "text_decoration_color": "#03030B",
        },
    ),
}


shadow = "rgba(0, 0, 0, 0.15) 0px 2px 8px"
chat_margin = "20%"
message_style = dict(
    padding="1em",
    border_radius="5px",
    margin_y="0.5em",
    box_shadow=shadow,
    max_width="30em",
    display="inline-block",
)

# Set specific styles for questions and answers.
title_style = {**message_style, **dict(bg="#FFD700", margin_left="100")}
question_style = {**message_style, **dict(bg="#F5EFFE", margin_left="100")}
answer_style = {**message_style, **dict(bg="#DEEAFD", margin_right="100")}
# Styles for the action bar.
input_style = dict(
    border_width="1px", padding="1em", box_shadow=shadow
)
button_style = dict(bg="#CEFFEE", box_shadow=shadow)
```

### test/state.py

```python
"""Base state for the app."""

import reflex as rx
import asyncio
import os
import openai

# export OPENAI_API_KEY="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"
openai.api_key = "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"

class State(rx.State):
    """Base state for the app.

    The base state is used to store general vars used throughout the app.
    """

    question: str

    # Keep track of the chat history as a list of (question, answer) tuples.
    chat_history: list[tuple[str, str]]

    MBTI_INITILIZATION = """
        You are a AI designed to help users explore aspects of their personality based on the Myers-Briggs Type Indicator (MBTI). Your responses are insightful, encouraging, and guide users to reflect on their personal preferences and behaviors. You are not here to label but to guide users through a series of open-ended questions that resonate with the core principles of MBTI.

        In your first response, you will (i) introduce the purpose of this interaction, (ii) assure the user of confidentiality, and (iii) ask the user an open-ended question about their personal tendencies or preferences.

        Throughout the conversation:
        (1) You will listen attentively to the user's responses.
        (2) You will ask questions that invite users to share more about their personal tendencies, decision-making processes, and how they interact with the world around them.
        (3) You will provide thoughtful insights and suggest resources for further personal exploration if the user's responses indicate they might be interested in it.

        Your responses should be concise and limited to 2 sentences.
        
        Your responses will be clear and respectful, providing a question at the end to facilitate an open dialogue. Based on the user's expressions and what they say, you will respond in a way that supports their personal growth and self-understanding.
        """
        
    question_mapping_zeroed = {
        "You regularly make new friends.": 0,
        "You spend a lot of your free time exploring various random topics that pique your interest": 0,
        "Seeing other people cry can easily make you feel like you want to cry too": 0,
        "You often make a backup plan for a backup plan.": 0,
        "You usually stay calm, even under a lot of pressure": 0,
        "At social events, you rarely try to introduce yourself to new people and mostly talk to the ones you already know": 0,
        "You prefer to completely finish one project before starting another.": 0,
        "You are very sentimental.": 0,
        "You like to use organizing tools like schedules and lists.": 0,
        "Even a small mistake can cause you to doubt your overall abilities and knowledge.": 0,
        "You feel comfortable just walking up to someone you find interesting and striking up a conversation.": 0,
        "You are not too interested in discussing various interpretations and analyses of creative works.": 0,
        "You are more inclined to follow your head than your heart.": 0,
        "You usually prefer just doing what you feel like at any given moment instead of planning a particular daily routine.": 0,
        "You rarely worry about whether you make a good impression on people you meet.": 0,
        "You enjoy participating in group activities.": 0,
        "You like books and movies that make you come up with your own interpretation of the ending.": 0,
        "Your happiness comes more from helping others accomplish things than your own accomplishments.": 0,
        "You are interested in so many things that you find it difficult to choose what to try next.": 0,
        "You are prone to worrying that things will take a turn for the worse.": 0,
        "You avoid leadership roles in group settings.": 0,
        "You are definitely not an artistic type of person.": 0,
        "You think the world would be a better place if people relied more on rationality and less on their feelings.": 0,
        "You prefer to do your chores before allowing yourself to relax.": 0,
        "You enjoy watching people argue.": 0,
        "You tend to avoid drawing attention to yourself.": 0,
        "Your mood can change very quickly.": 0,
        "You lose patience with people who are not as efficient as you.": 0,
        "You often end up doing things at the last possible moment.": 0,
        "You have always been fascinated by the question of what, if anything, happens after death.": 0,
        "You usually prefer to be around others rather than on your own.": 0,
        "You become bored or lose interest when the discussion gets highly theoretical.": 0,
        "You find it easy to empathize with a person whose experiences are very different from yours.": 0,
        "You usually postpone finalizing decisions for as long as possible.": 0,
        "You rarely second-guess the choices that you have made.": 0,
        "After a long and exhausting week, a lively social event is just what you need.": 0,
        "You enjoy going to art museums.": 0,
        "You often have a hard time understanding other people’s feelings.": 0,
        "You like to have a to-do list for each day.": 0,
        "You rarely feel insecure.": 0,
        "You avoid making phone calls.": 0,
        "You often spend a lot of time trying to understand views that are very different from your own.": 0,
        "In your social circle, you are often the one who contacts your friends and initiates activities.": 0,
        "If your plans are interrupted, your top priority is to get back on track as soon as possible.": 0,
        "You are still bothered by mistakes that you made a long time ago.": 0,
        "You rarely contemplate the reasons for human existence or the meaning of life.": 0,
        "Your emotions control you more than you control them.": 0,
        "You take great care not to make people look bad, even when it is completely their fault.": 0,
        "Your personal work style is clo
[truncated — 3031 more characters]
```

### test/intersystems_backend.py

```python
# Required libraries
from datetime import datetime

import pandas as pd
from sqlalchemy import create_engine, text, DateTime, insert, MetaData, Table, Column, Integer, PrimaryKeyConstraint, \
    String
import ssl

from sqlalchemy.exc import SQLAlchemyError

# Configure TLS
# PEM file contents as a string
pem_file_contents = """
-----BEGIN CERTIFICATE-----
MIIEqTCCA5GgAwIBAgIUB2JSTkrUmcf2RaXfb5fgT9oAaQMwDQYJKoZIhvcNAQEL
BQAwgZkxCzAJBgNVBAYTAlVTMRYwFAYDVQQIDA1NYXNzYWNodXNldHRzMQswCQYD
VQQHDAJVUzEhMB8GA1UECgwYSW50ZXJzeXN0ZW1zIENvcnBvcmF0aW9uMQ8wDQYD
VQQLDAZTUUxhYVMxMTAvBgNVBAMMKGE5MjBmY2RmMGY0MTAxMDNhY2JiMDEyNjBl
ZGFjNDYzYy1kYXRhLTAwHhcNMjMxMDI4MDE1NTA4WhcNMjQxMDI3MDE1NTA4WjCB
mTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDU1hc3NhY2h1c2V0dHMxCzAJBgNVBAcM
AlVTMSEwHwYDVQQKDBhJbnRlcnN5c3RlbXMgQ29ycG9yYXRpb24xDzANBgNVBAsM
BlNRTGFhUzExMC8GA1UEAwwoYTkyMGZjZGYwZjQxMDEwM2FjYmIwMTI2MGVkYWM0
NjNjLWRhdGEtMDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKzwBjDQ
FrSBTcLCRcQ1TjIV6fQxq6o9wGh3Oe+NfjVtRuW28ghE7oWL0fiXqvyjDruNY/cH
uREi20qubBH2fIV8RGW3Jrbo9dQEfn4pR9oCOFLBMfW1rETEbQLD3lyvvt3ya1jQ
fB8luK/X7fQhHNUsfufBvPUfuwshMY9u71JW22aB7uEkY3DmPyPyKikCKGmdm6bc
QV9rBSYXNA0c2dGYChB/idQ4n5t8jDKNHxyJmar/WJEvE2M/8N3LZeU/qYsIz9ng
0EEVB307WI6DEd8PWT+hGe3oBZmgNVGu96MiNVIy8774oksAFHysUwIbr13R63Ns
4Njvub03Oiuv9j0CAwEAAaOB5jCB4zAdBgNVHQ4EFgQUJWp1bhUY/OcMri/wYQoV
Ds7owcQwHwYDVR0jBBgwFoAUJWp1bhUY/OcMri/wYQoVDs7owcQwDwYDVR0TAQH/
BAUwAwEB/zCBjwYDVR0RBIGHMIGEgihhOTIwZmNkZjBmNDEwMTAzYWNiYjAxMjYw
ZWRhYzQ2M2MtZGF0YS0wgglsb2NhbGhvc3SCTWs4cy1iMmU2Nzc0Yi1hZTY1MTk2
NC1lYTdmMTc5MzZjLTE2OTdkMDAwNWJmYWI3ODIuZWxiLnVzLWVhc3QtMS5hbWF6
b25hd3MuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQCUhi9rCSjhF5TsmgbUHngkr6em
Zgaaf4IeNnxVtJhr8ZKv8n0po7xls7/3clAN4iNuZVe9Cz99L7oOxpE6LNSp5HKr
TyBZ8zZ2o7CFvTidCOIJqyMUFhDYDi1852dZ/kpkK4pRdrKmGCjFsuFjGG95hLKA
uIm/0BuLlpzwGh7pXT28K1L4wpvHoHKJHP79pO/beZGPqtuRFJqaVxdLz0XF4Lam
WtjGNNUtE885dmYPrBuIfg/LCEr9Y1vYUzHt+yN03VmdPZ9xXyApkFVTlaEyORCx
2/Q/zfODYF7uqEI2/WyWy/YUpCUoecHm9k250VSC4dvSqGbAvdkAqWnJSsr2
-----END CERTIFICATE-----
"""

question_mapping = {
    "You regularly make new friends.": "MakeNewFriends",
    "You spend a lot of your free time exploring various random topics that pique your interest": "ExploreTopics",
    "Seeing other people cry can easily make you feel like you want to cry too": "EmpathyCry",
    "You often make a backup plan for a backup plan.": "BackupPlans",
    "You usually stay calm, even under a lot of pressure": "CalmUnderPressure",
    "At social events, you rarely try to introduce yourself to new people and mostly talk to the ones you already know": "SocialIntroversion",
    "You prefer to completely finish one project before starting another.": "SingleTasking",
    "You are very sentimental.": "Sentimental",
    "You like to use organizing tools like schedules and lists.": "OrganizeTools",
    "Even a small mistake can cause you to doubt your overall abilities and knowledge.": "DoubtByMistake",
    "You feel comfortable just walking up to someone you find interesting and striking up a conversation.": "ConfidentApproach",
    "You are not too interested in discussing various interpretations and analyses of creative works.": "DislikeInterpretation",
    "You are more inclined to follow your head than your heart.": "HeadOverHeart",
    "You usually prefer just doing what you feel like at any given moment instead of planning a particular daily routine.": "Spontaneous",
    "You rarely worry about whether you make a good impression on people you meet.": "UnworriedImpression",
    "You enjoy participating in group activities.": "EnjoyGroupActivities",
    "You like books and movies that make you come up with your own interpretation of the ending.": "InterpretiveEndings",
    "Your happiness comes more from helping others accomplish things than your own accomplishments.": "HappinessInHelping",
    "You are interested in so many things that you find it difficult to choose what to try next.": "VariedInterests",
    "You are prone to worrying that things will take a turn for the worse.": "WorryWorse",
    "You avoid leadership roles in group settings.": "AvoidLeadership",
    "You are definitely not an artistic type of person.": "NotArtistic",
    "You think the world would be a better place if people relied more on rationality and less on their feelings.": "RationalityOverFeelings",
    "You prefer to do your chores before allowing yourself to relax.": "ChoresFirst",
    "You enjoy watching people argue.": "EnjoyArguments",
    "You tend to avoid drawing attention to yourself.": "AvoidAttention",
    "Your mood can change very quickly.": "MoodSwings",
    "You lose patience with people who are not as efficient as you.": "ImpatientWithInefficiency",
    "You often end up doing things at the last possible moment.": "Procrastinate",
    "You have always been fascinated by the question of what, if anything, happens after death.": "AfterlifeCuriosity",
    "You usually prefer to be around others rather than on your own.": "PrefersCompany",
    "You become bored or lose interest when the discussion gets highly theoretical.": "BoredByTheory",
    "You find it easy to empathize with a person whose experiences are very different from yours.": "EasyEmpathy",
    "You usually postpone finalizing decisions for as long as possible.": "DelayDecisions",
    "You rarely second-guess the choices that you have made.": "ConfidentChoices",
    "After a long and exhausting week, a lively social event is just what you need.": "RechargeSocially",
    "You enjoy going to art museums.": "EnjoyArtMuseums",
    "You often have a hard time understanding other people’s feelings.": "HardToUnderstandFeelings",
    "You like to have a to-do list for each day.": "DailyToDoList",
    "You rarely feel insecure.": "SeldomInsecure",
    "You avoid making phone calls.": "AvoidPhoneCalls",
    "You often spend a lot of time trying to understand views that are very different from your own.": "UnderstandDifferentViews",
    "In your social circle, you are often
[truncated — 7618 more characters]
```

### test/templates/__init__.py

```python
from .template import template

```

### test/pages/question.py

```python
from test import styles
from test.templates import template
from test.state import State

import reflex as rx

```

[7 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]