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
- Input a JSON-like sequence.
- Or upload a .csvfile with numerical sequences.
- Click βPredictβ to see the model forecast.
π§ How It Works
- User Input: - You can enter sequences directly or upload a .csvwith your own data.
 
- You can enter sequences directly or upload a 
- 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.
 
- The LSTM model is loaded from 
- 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
