Streamlit deployment stuck on epoch 3 and taking too long

The deployment taking too long, I’m using LSTM and it stuck like this for more than 20 minutes. I was running the same code with google collab and showing the dashboard with ngrok and there is nothing wrong with the code, but streamlit taking too long.

  warnings.warn(
Model: "sequential"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Layer (type)                    ┃ Output Shape           ┃       Param # ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ embedding (Embedding)           │ (None, 50, 128)        │       640,000 │
├─────────────────────────────────┼────────────────────────┼───────────────┤
│ lstm (LSTM)                     │ (None, 50, 64)         │        49,408 │
├─────────────────────────────────┼────────────────────────┼───────────────┤
│ dropout (Dropout)               │ (None, 50, 64)         │             0 │
├─────────────────────────────────┼────────────────────────┼───────────────┤
│ lstm_1 (LSTM)                   │ (None, 32)             │        12,416 │
├─────────────────────────────────┼────────────────────────┼───────────────┤
│ dense (Dense)                   │ (None, 3)              │            99 │
└─────────────────────────────────┴────────────────────────┴───────────────┘
 Total params: 701,923 (2.68 MB)
 Trainable params: 701,923 (2.68 MB)
 Non-trainable params: 0 (0.00 B)
353/420 ━━━━━━━━━━━━━━━━━━━━ 3s 56ms/step - accuracy: 0.4782 - loss: 0.9672[2025-04-11 05:32:35.163708] Epoch 1/20
420/420 ━━━━━━━━━━━━━━━━━━━━ 24s 58ms/step - accuracy: 0.4812 - loss: 0.9653 - val_accuracy: 0.6285 - val_loss: 0.9015
Epoch 3/20