Nrup Parikh
Readme update
fdff020
metadata
title: Stock Forecast App
emoji: πŸ“ˆ
colorFrom: indigo
colorTo: indigo
sdk: docker
pinned: false
license: mit
short_description: Stock Prediction using Flask framework

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

🧠 Stock Price Predictor β€” Flask + Random Forest

A machine learning web app built using Flask and deployed on Hugging Face Spaces with Docker.
It predicts future stock prices using historical Yahoo Finance data and Random Forest regression.


πŸš€ Tech Stack

  • Flask β€” Web framework to build the backend logic and user interface.
  • Gunicorn β€” WSGI production server for running Flask apps.
  • YFinance β€” Fetches live and historical stock data.
  • Scikit-learn β€” Implements the Random Forest prediction model.
  • Pandas & NumPy β€” For data manipulation and mathematical operations.

βš™οΈ Features

βœ… Fetch 5 years of stock data from Yahoo Finance
βœ… Compute indicators (RSI, MACD, Moving Averages)
βœ… Predict next 30-day prices using Random Forest
βœ… Detect trend (Bullish / Bearish / Sideways)
βœ… Suggest entry and stop-loss points
βœ… Display detailed report and 30-day recent table


🐳 Deployment on Hugging Face

This Space uses Docker runtime.

Files used:

  • Dockerfile β€” Defines the container environment
  • requirements.txt β€” Lists Python dependencies
  • app.py β€” Contains Flask application logic

To deploy:

  1. Create a new Hugging Face Space.
  2. Choose Docker as the SDK.
  3. Upload app.py, requirements.txt, and Dockerfile.
  4. Click Deploy Space β€” your Flask app will run automatically on port 7860.