GenVest: Sentiment Analysis and What-If Scenario Exploration This Streamlit application, GenVest, provides a platform for analyzing news sentiment and exploring potential future scenarios using a pre-trained DistilBERT model.

Inspiration The ever-changing news landscape can be overwhelming. GenVest aims to empower users by enabling them to quickly grasp the sentiment of news articles and explore potential impacts of future events through AI-powered scenario analysis.

What it Does GenVest offers two key functionalities:

Sentiment Analysis: Users can paste news text into the designated area, and GenVest will analyze the sentiment using a DistilBERT model, classifying it as either "NEGATIVE" or "POSITIVE" (sentiment labels can be further customized). This helps users understand the overall emotional tone of the news article.

What-If Scenario Exploration (Under Development): Users can type in a "What-If" scenario (e.g., "What if interest rates rise?"). While the full functionality is yet to be implemented, the goal is to leverage a generative AI model (like Gemini AI) to create a text response based on the provided prompt. This response could explore potential future implications of the proposed scenario.

Current Limitations:

The "What-If Scenario Exploration" section is currently under development. The placeholder comments indicate the intended functionalities of using a generative AI model to create scenario responses. How We Built It Streamlit Framework: GenVest is built using the Streamlit framework, which allows for creating interactive web apps in Python. This simplifies the development process and makes the application accessible through a web browser.

DistilBERT Model: The sentiment analysis functionality utilizes a pre-trained DistilBERT model (distilbert-base-uncased-finetuned-sst-2-english) for sentiment classification. This model is loaded from the Transformers library.

Text Processing: The analyze_sentiment function preprocesses the news text using the model's tokenizer and then feeds it into the DistilBERT model to obtain sentiment predictions.

User Interface: Streamlit components like st.text_area and st.write are used to create a user-friendly interface for text input and displaying results.

Challenges We Faced Understanding Complex Models: Working with pre-trained transformers like DistilBERT involves some understanding of their structure and functionality. This required researching the model's architecture and output format to correctly interpret predictions.

Integrating Generative AI (Under Development): While the core sentiment analysis functionality is complete, the "What-If Scenario Exploration" requires integrating a generative AI model. This involves understanding the specific API or functionality provided by the chosen model (like Gemini AI) and implementing code to interact with it.

Accomplishments We're Proud Of Building a functional sentiment analysis application using a pre-trained DistilBERT model.

Creating a user-friendly Streamlit interface for text input and result visualization.

Laying the groundwork for integrating a generative AI model for scenario exploration (work in progress).

What We Learned The power of Streamlit for rapidly developing interactive web applications.

The capabilities of pre-trained transformers like DistilBERT for sentiment analysis tasks.

The potential of generative AI models for exploring future scenarios based on user prompts.

What's Next for GenVest Refine Sentiment Analysis: Further explore customizing sentiment labels and potentially incorporating more granular sentiment categories.

Implement Generative AI Integration: Fully integrate the chosen generative AI model (like Gemini AI) to create text responses for "What-If" scenarios.

Enhance User Experience: Improve the user interface for a more engaging and informative experience.

Explore Explainability: Consider incorporating techniques to explain the rationale behind the sentiment analysis and scenario exploration results.

Built With

Share this project:

Updates