Sonia2k5's picture
Update README.md
30382c8 verified
---
title: Next Number Predictor
emoji: 😻
colorFrom: blue
colorTo: gray
sdk: gradio
sdk_version: 5.38.0
app_file: app.py
pinned: false
license: mit
short_description: To predict next number by sequence
---
# πŸ”’ Next Number Predictor using LSTM
This is a simple Gradio web app that uses a trained LSTM model to predict the **next number** in a sequence.
---
## πŸš€ Features
- Predicts the next number given a fixed-length numeric sequence.
- Clean and interactive Gradio interface.
- Easy to run locally or deploy to platforms like Hugging Face Spaces.
---
## πŸ“ Files Included
- `main.py` – The Gradio web app script.
- `requirements.txt` – Python dependencies.
- `next_number_model.h5` – Your trained LSTM model (not included in this repo – you must provide your own).
---
## πŸ“₯ Example Input
If your model was trained with a **window size of 3**, enter:3,4,5
example code:
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LSTM, Dense
model = Sequential([
LSTM(50, activation='relu', input_shape=(3, 1)),
Dense(1)
])
model.compile(optimizer='adam', loss='mse')
model.fit(X_train, y_train, epochs=200, verbose=1)
model.save("next_number_model.h5")
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference