-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_and_run.bat
56 lines (48 loc) · 1.28 KB
/
setup_and_run.bat
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
55
56
@echo off
setlocal enabledelayedexpansion
REM Name of the virtual environment
set ENV_NAME=cellpose-gradio-env
REM Check if Python is installed
where python >nul 2>&1
if %errorlevel% neq 0 (
echo Python is not installed or not in the system PATH.
echo Please install Python and try again.
pause
exit /b 1
)
REM Create the virtual environment
echo Creating virtual environment: %ENV_NAME%
python -m venv %ENV_NAME%
if %errorlevel% neq 0 (
echo Failed to create virtual environment.
pause
exit /b 1
)
REM Activate the environment
echo Activating virtual environment...
call %ENV_NAME%\Scripts\activate
if %errorlevel% neq 0 (
echo Failed to activate virtual environment.
pause
exit /b 1
)
REM Install required packages
echo Installing required packages...
pip install numpy matplotlib pillow gradio seaborn cellpose tifffile werkzeug io jsonschema
if %errorlevel% neq 0 (
echo Failed to install packages.
pause
exit /b 1
)
REM Launch the Gradio app
echo Launching Cellpose Gradio app...
python Cellpose_gradio.py
if %errorlevel% neq 0 (
echo Failed to run Cellpose_gradio.py.
pause
exit /b 1
)
REM Deactivate the environment
call deactivate
echo Setup complete and app launched.
pause