Deepfake Authenticator commited on
Commit
9c22ae9
·
1 Parent(s): 6b659dc

feat: add one-click start scripts (start.bat / start.sh)

Browse files
Files changed (2) hide show
  1. start.bat +45 -0
  2. start.sh +34 -0
start.bat ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @echo off
2
+ title Deepfake Authenticator
3
+ color 0A
4
+
5
+ echo.
6
+ echo ============================================
7
+ echo DEEPFAKE AUTHENTICATOR - Starting...
8
+ echo ============================================
9
+ echo.
10
+
11
+ :: Check if venv exists
12
+ if not exist "venv\Scripts\activate.bat" (
13
+ echo [!] Virtual environment not found.
14
+ echo [*] Run setup.bat first to install dependencies.
15
+ echo.
16
+ pause
17
+ exit /b 1
18
+ )
19
+
20
+ :: Activate venv
21
+ call venv\Scripts\activate.bat
22
+
23
+ :: Kill anything on port 8000
24
+ echo [*] Clearing port 8000...
25
+ for /f "tokens=5" %%a in ('netstat -aon ^| findstr ":8000 " 2^>nul') do (
26
+ taskkill /PID %%a /F >nul 2>&1
27
+ )
28
+
29
+ echo [*] Starting server...
30
+ echo [*] Open your browser at: http://localhost:8000
31
+ echo.
32
+ echo Press Ctrl+C to stop the server.
33
+ echo ============================================
34
+ echo.
35
+
36
+ :: Open browser after 5 seconds in background
37
+ start /b cmd /c "timeout /t 8 /nobreak >nul && start http://localhost:8000"
38
+
39
+ :: Start server
40
+ cd backend
41
+ python -m uvicorn main:app --host 0.0.0.0 --port 8000 --log-level warning
42
+
43
+ echo.
44
+ echo Server stopped.
45
+ pause
start.sh ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ clear
3
+ echo ""
4
+ echo " ============================================"
5
+ echo " DEEPFAKE AUTHENTICATOR - Starting..."
6
+ echo " ============================================"
7
+ echo ""
8
+
9
+ # Check venv
10
+ if [ ! -f "venv/bin/activate" ]; then
11
+ echo " [!] Virtual environment not found."
12
+ echo " [*] Run ./setup.sh first to install dependencies."
13
+ echo ""
14
+ exit 1
15
+ fi
16
+
17
+ source venv/bin/activate
18
+
19
+ # Kill anything on port 8000
20
+ echo " [*] Clearing port 8000..."
21
+ lsof -ti:8000 | xargs kill -9 2>/dev/null
22
+
23
+ echo " [*] Starting server..."
24
+ echo " [*] Open your browser at: http://localhost:8000"
25
+ echo ""
26
+ echo " Press Ctrl+C to stop."
27
+ echo " ============================================"
28
+ echo ""
29
+
30
+ # Open browser after 8s in background
31
+ (sleep 8 && open "http://localhost:8000" 2>/dev/null || xdg-open "http://localhost:8000" 2>/dev/null) &
32
+
33
+ cd backend
34
+ python -m uvicorn main:app --host 0.0.0.0 --port 8000 --log-level warning