Inspiration

The inspiration for this project is to understand connect users to books through a novel search interface. Drawing a squiggle to represent a search query, an emotional arc in this case, is intuitive and may be easier for those who are disabled.

What it does

Uses the Gemini API to analyze texts from Project Gutenberg and to process user-generated squiggle charts. Takes positive and negative emotions from these texts and generates a sparkline chart ranging from -1 to +1 for each text based on emotion. Uses dynamic time warping to compare book sparkline chart with squiggle provided by the user.

How we built it

Pulled text data from Gutentext API and used Jupyter and Google Gemini API to process text data to extract emotions. Used streamlit to host the application for users to provide their own squiggle input. This squiggle input was then compared for closeness to existing books based on dynamic time warping.

Challenges we ran into

Challenges we ran into include fine-tuning the prompts for Gemini and the processing of large amounts of text. Gemini had a hard time accurately interpreting user-provided squiggles. Gemini often provided inconsistent results when scoring the same emotion if it appeared multiple times in the text.

Accomplishments that we're proud of

Gaining understanding of generative AI with Google Gemini and eventually deploying a functional application that is accessible.

What we learned

Learning how to leverage generative AI and Google Gemini for practical applications.

What's next for Project Gutenberg Emotional Analysis

Using Gemini to obtain more text data for sparkline chart accuracy.

Built With

  • gemini
  • gutentext
  • jupyter
  • python
  • streamlit
Share this project:

Updates