-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLLMFlowSearch.command
More file actions
executable file
·42 lines (35 loc) · 1.11 KB
/
LLMFlowSearch.command
File metadata and controls
executable file
·42 lines (35 loc) · 1.11 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
#!/bin/bash
# Get the directory where the script is located
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR"
echo "========================================"
echo " 🚀 LLMFlow Search Agent Launcher"
echo "========================================"
# 1. Kill any process running on port 8000
echo "🧹 Cleaning up port 8000..."
PID=$(lsof -ti:8000)
if [ ! -z "$PID" ]; then
kill -9 $PID
echo " - Killed process $PID on port 8000"
else
echo " - Port 8000 is free"
fi
# 2. Activate virtual environment if it exists
if [ -d "venv" ]; then
echo "🔌 Activating virtual environment..."
source venv/bin/activate
elif [ -d ".venv" ]; then
echo "🔌 Activating virtual environment..."
source .venv/bin/activate
else
echo "⚠️ No virtual environment found. Using system python3."
fi
# 3. Open browser in background after 3 seconds
(sleep 3 && open "http://localhost:8000") &
# 4. Start the server
echo "⚡ Starting Web Server..."
echo " - Logs will appear below"
echo " - Press Ctrl+C to stop"
echo "========================================"
echo ""
python3 web_server.py