Skip to content

kirtisingh05/EthOracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EthOracle: Ethereum Price Prediction Using LSTM

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.

Table of Contents

Overview

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.

Features

  • 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.

Technologies Used

  • 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)

Folder Structure

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

Installation

Backend Setup

  1. Clone the Repository:

    git clone https://github.com/yourusername/EthOracle.git
    cd EthOracle/backend
  2. (Optional) Create a Virtual Environment:

    python -m venv venv
    venv\Scripts\activate  # Windows
    # or
    source venv/bin/activate  # macOS/Linux
  3. Upgrade pip, setuptools, and wheel:

    python -m pip install --upgrade pip setuptools wheel
  4. Install Dependencies:

    pip install --only-binary=:all: -r requirements.txt
  5. Ensure that eth_price_model.h5 and scaler.pkl are in the backend folder.

  6. Run the Flask Server:

    python app.py

    The server will start at http://localhost:5000.

Frontend Setup

  1. Navigate to the Frontend Folder:

    cd ../frontend
  2. Install Dependencies:

    npm install
  3. Start the React App:

    npm start

    The app will open in your default browser at http://localhost:3000.

Usage

  • 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.

Screenshots

EthOracle Home image

Example of the EthOracle React frontend displaying the predicted price.

Contact

For questions, suggestions, or contributions, please contact [email protected] or open an issue in the repository.

Happy predicting!

About

AI-driven web application that forecasts Ethereum (ETH) prices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published