This project tracks product prices, forecasts future prices using ARIMA models, and sends notifications via Slack.
currently only scrapes Amazon. remaining: integrating Flipkart
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install the required dependencies:
pip install -r requirements.txt
- Log in to Slack: Open your Slack workspace in a browser or the app.
- Go to API Website: Navigate to Slack API.
- Create an App:
- Click on "Create an App".
- Choose "From scratch" and name your app.
- Select the workspace where the app will be used.
- Enable Incoming Webhooks:
- In your app settings, go to "Incoming Webhooks".
- Toggle "Activate Incoming Webhooks" to ON.
- Add a Webhook to a Channel:
- Scroll down and click "Add New Webhook to Workspace".
- Select the channel where messages will be sent.
- Click "Allow".
- Copy Webhook URL:
- After adding, the webhook URL will be displayed.
- Copy and use it in your application.
- Obtain a Gemini API key.
- Keep the key securely stored for configuration.
- After setting up the Slack Incoming Webhook URL and Gemini API key, run the app with Streamlit:
streamlit run main.py
scrape.py: Scrapes data from Amazon using product links fromPRODUCTS_LINKS_MAP.assets/scraped_data_products.json: Stores the accumulated scraped data.assets/last_scraped_data: Contains data from the latest scraping run.assets/forecasting_assets/models: ARIMA models for price forecasting.assets/forecasting_assets/arima_training_data: Training data for ARIMA models. (csv files)assets/price_history_data: Daily price records in CSV format.
llm_inference.py: functions using Gemini API for sentiment analysis and strategy prediction and suggestion.arima.py: Functions for training ARIMA models and forecasting prices.slack_notification.py: Functions for sending notifications via Slack.
This project has a daily task for scraping product data. It is managed via GitHub Actions in the file .github/workflows/daily_scrape.yml.