File size: 2,463 Bytes
b13cac0 3d2d4fc b13cac0 3d2d4fc b13cac0 3d2d4fc 5f08083 3d2d4fc b13cac0 3d2d4fc b13cac0 3d2d4fc b13cac0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
---
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):
```bash
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
|