Spaces:
Sleeping
Sleeping
File size: 498 Bytes
b554606 3d5a319 acccbe4 ff5bd6a acccbe4 b554606 4b95470 acccbe4 3d5a319 acccbe4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#!/bin/sh
set -e # Exit on any error
echo "Starting Rasa server..."
# Train the model if not found
if [ ! -d "models" ] || [ -z "$(ls -A models)" ]; then
echo "No trained model found. Training a new model..."
rasa train
fi
# Start the Rasa server
rasa run -m models --enable-api --cors "*" --debug --port 5005 &
# Allow Rasa server some time to initialize
sleep 5
# Start the Rasa Actions server
rasa run actions --actions actions --debug --port 5055 &
# Keep the container running
wait
|