EthOracle is an AI-driven web application that forecasts Ethereum (ETH) prices using a Long Short-Term Memory (LSTM) neural network. The project features a Flask backend that fetches historical price data from Yahoo Finance, preprocesses it, and uses a pre-trained LSTM model to predict future prices. A React frontend consumes the backend API to display real-time predictions in a modern, responsive UI.
The goal of EthOracle is to provide an accurate prediction of Ethereum prices using deep learning. The application downloads historical data from Yahoo Finance, processes it, and uses an LSTM-based neural network to predict future price movements. The predicted price is then served via a RESTful API and displayed on a sleek React frontend.
- Data Collection: Retrieves historical Ethereum (ETH-USD) price data from Yahoo Finance.
- Data Preprocessing: Uses MinMaxScaler to normalize the data.
- Model Training: Implements an LSTM network with early stopping to prevent overfitting.
- Prediction: Forecasts the next price using the trained model.
- Visualization: (Optional) Plots actual vs. predicted prices.
- API Integration: Flask backend with CORS enabled for seamless integration with the React frontend.
- Responsive UI: Modern React app with an attractive and animated CSS design.
- Backend: Python, Flask, Flask-CORS, TensorFlow/Keras, yfinance, NumPy, Pandas, Scikit-Learn, Pickle
- Frontend: React, HTML, CSS, JavaScript
- Deployment: Localhost for development (can be deployed on platforms like Heroku, Netlify, or Render)
EthOracle/
├── backend/
│ ├── app.py
│ ├── requirements.txt
│ ├── eth_price_model.h5
│ └── scaler.pkl
└── frontend/
├── public/
│ └── index.html
├── src/
│ ├── App.js
│ ├── App.css
│ ├── api.js
│ └── index.js
└── package.json
-
Clone the Repository:
git clone https://github.com/yourusername/EthOracle.git cd EthOracle/backend
-
(Optional) Create a Virtual Environment:
python -m venv venv venv\Scripts\activate # Windows # or source venv/bin/activate # macOS/Linux
-
Upgrade pip, setuptools, and wheel:
python -m pip install --upgrade pip setuptools wheel
-
Install Dependencies:
pip install --only-binary=:all: -r requirements.txt
-
Ensure that
eth_price_model.h5
andscaler.pkl
are in the backend folder. -
Run the Flask Server:
python app.py
The server will start at http://localhost:5000.
-
Navigate to the Frontend Folder:
cd ../frontend
-
Install Dependencies:
npm install
-
Start the React App:
npm start
The app will open in your default browser at http://localhost:3000.
-
Backend API:
Visit http://localhost:5000/predict to see a JSON response with the predicted Ethereum price. -
Frontend:
The React application automatically fetches the predicted price from the Flask backend and displays it on the homepage.
Example of the EthOracle React frontend displaying the predicted price.
For questions, suggestions, or contributions, please contact [email protected] or open an issue in the repository.
Happy predicting!