Seyomi's picture
Rename README.MD to README.md
ae15466 verified
metadata
title: πŸ“Š Multimodal Financial Forecast
emoji: πŸ“ˆ
colorFrom: indigo
colorTo: green
sdk: docker
pinned: false

πŸ“Š Multimodal Financial Forecast

This app predicts future financial values from time series using an LSTM model. Input sequences or upload CSVs to get started.

πŸ”§ Tech Stack

  • Backend: FastAPI (app/main.py)
  • ML Model: PyTorch LSTM
  • Deployment: Hugging Face Spaces (Docker)

πŸš€ How to Use

  1. Input a JSON-like sequence.
  2. Or upload a .csv file with numerical sequences.
  3. Click β€œPredict” to see the model forecast.

🧠 How It Works

  1. User Input:

    • You can enter sequences directly or upload a .csv with your own data.
  2. Model Inference:

    • The LSTM model is loaded from pipeline/trained_models/.
    • Input sequences are normalized and passed into the model.
    • The output is a forecast of future values.
  3. Output:

    • The results are displayed directly on the webpage.
    • Graph removed (clean, console-style output).

πŸ›  Tech Stack

Layer Tech
Backend FastAPI
ML Model PyTorch LSTM
Frontend HTML + CSS
Deployment Docker + Hugging Face Spaces

πŸ“‚ Project Structure

multimodal-financial-forecast/ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ main.py # FastAPI backend β”‚ β”œβ”€β”€ templates/ β”‚ β”‚ └── index.html # User interface β”‚ └── static/ β”‚ └── style.css # Stylesheet β”‚ β”œβ”€β”€ pipeline/ β”‚ β”œβ”€β”€ inference_pipeline.py # Model loading and inference β”‚ └── trained_models/ β”‚ β”œβ”€β”€ lstm_forecaster.pt # Trained LSTM model β”‚ └── config.json # Input/output config β”‚ β”œβ”€β”€ requirements.txt # Python dependencies β”œβ”€β”€ Dockerfile # Docker config β”œβ”€β”€ README.md # Project overview └── .gitignore

βœ… Requirements

Install dependencies locally (for testing):

pip install -r requirements.txt

## Run the app locally:

uvicorn app.main:app --reload

## πŸ“ Example CSV Format

Sample input file (for upload):

0.1,0.2,0.3,0.4,0.5
0.5,0.6,0.7,0.8,0.9


## 🐳 Docker Deployment

FROM python:3.10-slim

WORKDIR /app

COPY . .

RUN pip install --upgrade pip && pip install -r requirements.txt

EXPOSE 7860

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]


## Build and Run Locally

docker build -t multimodal-forecast .
docker run -p 7860:7860 multimodal-forecast