Spaces:
Sleeping
Sleeping
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 environmentrequirements.txtβ Lists Python dependenciesapp.pyβ Contains Flask application logic
To deploy:
- Create a new Hugging Face Space.
- Choose Docker as the SDK.
- Upload
app.py,requirements.txt, andDockerfile. - Click Deploy Space β your Flask app will run automatically on port 7860.