Spaces:
Running
Running
Gradio Server Management Scripts
Quick scripts to manage the Gradio web interface server.
Scripts
π start_gradio.sh
Start the Gradio server.
# Start in foreground (Ctrl+C to stop)
./start_gradio.sh
# Start in background
./start_gradio.sh --background
./start_gradio.sh -b
Background mode:
- Server runs in background
- Logs saved to
logs/gradio.log - View logs:
tail -f logs/gradio.log - Stop with:
./stop_gradio.sh
π stop_gradio.sh
Stop any running Gradio server.
./stop_gradio.sh
Kills all app_gradio.py processes safely.
π restart_gradio.sh
Stop and restart the Gradio server (one command).
# Restart in foreground
./restart_gradio.sh
# Restart in background
./restart_gradio.sh --background
./restart_gradio.sh -b
Use this when:
- You made code changes
- Server is unresponsive
- Testing new features
Quick Reference
# Common workflow
./restart_gradio.sh -b # Start in background for development
tail -f logs/gradio.log # Watch logs
./stop_gradio.sh # Stop when done
# Manual server (see all output)
./start_gradio.sh # Ctrl+C to stop
Port
Default: http://localhost:7860
Troubleshooting
"Address already in use":
./stop_gradio.sh # Kill old server
./start_gradio.sh # Try again
Server won't stop:
ps aux | grep app_gradio # Find PID
kill -9 <PID> # Force kill
Check if running:
ps aux | grep app_gradio
Files
start_gradio.sh- Start server (kills old one first)stop_gradio.sh- Stop serverrestart_gradio.sh- Stop + Start in one commandlogs/gradio.log- Background server logs