File size: 1,322 Bytes
57188d0
 
 
 
 
 
 
 
 
 
 
 
 
f1fd30a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30382c8
f1fd30a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57188d0
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
---
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