The Market Analysis & Sentiment Tracking App is a Streamlit-powered application designed to help businesses analyze market sentiment. Using advanced AI models, it processes textual data (e.g., customer reviews, tweets) to generate actionable insights through sentiment analysis, visualizations, and automated reporting.
- Data Collection:
- Import data from CSV files or APIs.
- AI-Powered Sentiment Analysis:
- Leverages HuggingFace Transformers for real-time sentiment analysis.
- Dynamic Visualizations:
- Visualize sentiment distributions with intuitive bar charts.
- Automated Reporting:
- Generate professional PDF reports summarizing the analysis.
- User-Friendly Interface:
- Streamlit-powered app for non-technical users.
- Python (Core Programming Language)
- Libraries:
streamlit
: Frontend for the interactive apptransformers
: Sentiment analysis (HuggingFace)matplotlib
: Visualizationfpdf
: PDF reportingpandas
: Data handling and processingrequests
: API integration
- Docker:
- Containerization for easy deployment and reproducibility
- Python 3.9 or later
- Docker (optional, for containerized deployment)
-
Clone the Repository:
git clone https://github.com/your-username/your-repository-name.git cd your-repository-name
-
Set Up a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Set API Keys:
- Create a
.env
file or updateconfig.py
with your API keys. - Example
.env
:TWITTER_API_KEY=your-twitter-api-key OTHER_API_KEY=your-other-api-key
- Create a
-
Run the App:
streamlit run main.py
- Access the app at
http://localhost:8501
.
- Access the app at
- Upload a CSV file with a column named
text
(e.g., customer reviews, tweets).
- The app will analyze each text entry and classify it as
POSITIVE
,NEGATIVE
, orNEUTRAL
.
- View the sentiment distribution as a bar chart.
- Click "Generate PDF Report" to create a professional summary of the results.
-
Build the Docker Image:
docker build -t market-analysis-app .
-
Run the Docker Container:
docker run -p 8080:8080 market-analysis-app
-
Access the App:
- Open
http://localhost:8080
in your browser.
- Open
.
├── src/
│ ├── config.py # Configuration (API keys, paths)
│ ├── data_collection.py # Data collection and preprocessing
│ ├── ai_processing.py # Sentiment analysis using AI
│ ├── visualization.py # Visualization (bar charts)
│ └── reporting.py # PDF report generation
├── data/ # Data folder (CSV files)
├── reports/ # Generated PDF reports
├── main.py # Streamlit app
├── requirements.txt # Dependencies
├── Dockerfile # Docker configuration
├── README.md # Project documentation
- Advanced AI Features:
- Topic modeling with BERTopic.
- Additional Visualizations:
- Word clouds, trend charts, etc.
- API Integration:
- Enable real-time data collection from social media or other platforms.
- Authentication:
- Secure access for multiple users.
Contributions are welcome! If you'd like to improve this project, please:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Submit a pull request.
This project is licensed under the MIT License.
For questions or suggestions, feel free to reach out:
- Your Name:
- GitHub: