-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
路55 lines (46 loc) 路 1.38 KB
/
Copy pathstart.sh
File metadata and controls
executable file
路55 lines (46 loc) 路 1.38 KB
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
#!/bin/bash
echo "================================================"
echo "馃帹 Background Removal Tool - Setup & Start"
echo "================================================"
echo ""
# Check if virtual environment exists
if [ ! -d ".venv" ]; then
echo "馃摝 Creating virtual environment..."
python3 -m venv .venv
fi
# Activate virtual environment
echo "馃敡 Activating virtual environment..."
source .venv/bin/activate
# Install dependencies
echo "馃摜 Installing dependencies..."
pip install -q -r requirements.txt
# Create models directory
mkdir -p models
# Check if model exists
if [ ! -f "models/u2net.pth" ]; then
echo ""
echo "鈿狅笍 Model weights not found!"
echo "馃摜 Downloading U虏-Net model (~176 MB)..."
echo ""
python app/utils/download_model.py
echo ""
fi
# Start the server
echo ""
echo "================================================"
echo "馃殌 Starting Backend Server..."
echo "================================================"
echo ""
echo "Backend: http://localhost:8000"
echo "API Docs: http://localhost:8000/docs"
echo ""
echo "馃摑 To use the application:"
echo " 1. Open client/index.html in your browser"
echo " OR"
echo " 2. Run: cd client && python -m http.server 3000"
echo " Then visit: http://localhost:3000"
echo ""
echo "Press CTRL+C to stop"
echo "================================================"
echo ""
python main.py