Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta b #116

Merged
merged 7 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ Samples/*
/venv_2
/venv
/Interface/CLI/Data/Python Embed 3.10.11
/Interface/CLI/Data/Use_Python_Embed.tmp
/Interface/CLI/Data/Use_Python_Embed.tmp
/Interface/CLI/Python.Embed.3.10.11.exe
27 changes: 25 additions & 2 deletions Interface/CLI/CLI.cmd
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
@echo off
REM Conf:
setlocal enabledelayedexpansion
TITLE Pneumonia-Detection-Ai-CLI
set python_min_VER=10
set DEBUG=0
set arg=%1
set quotation=\"
set PV_filepath="Data\\Python Ver.tmp"
set PUE_filepath="Data\\Use_Python_Embed.tmp"
set Python_Embed_URL="https://github.com/Aydinhamedi/Pneumonia-Detection-Ai/releases/download/Other-Data-V1/Python.Embed.3.10.11.exe"
set Python_Embed_Name="Python.Embed.3.10.11.exe"
set python_path=python
set pip_path=pip

Expand Down Expand Up @@ -109,7 +111,7 @@ if exist %PUE_filepath% (
)
echo Error: Python is not installed
set /p UserInput="Do you want to use the embedded Python (y/n)? "
if /I "%UserInput%"=="y" (
if /I "!UserInput!"=="y" (
for /D %%X in ("Data\\Python Embed*") do (
if exist "%%X\python.exe" (
if exist "%%X\\Scripts\\pip.exe" (
Expand All @@ -121,6 +123,27 @@ if /I "%UserInput%"=="y" (
)
)
echo Error: Failed to find embedded Python.
set /p downloadPython="Do you want to download the embedded Python (y/n)? "
if /I "!downloadPython!"=="y" (
REM Download the file using curl
echo Downloading the embedded Python...

curl -L -o %Python_Embed_Name% %Python_Embed_URL%

REM Extract the file to the Data folder
echo Extracting the embedded Python...
"%Python_Embed_Name%" -o"%cd%\\Data" -y

REM Delete the original file
echo Deleting the original file...
del "%Python_Embed_Name%"

REM Restarting the CLI luncher...
echo Restarting the CLI luncher (in 8 seconds^^^)...
timeout /t 8 >nul
start "" "%~f0"
exit
)
)
pause
goto :EOF
Expand Down
33 changes: 0 additions & 33 deletions Interface/CLI/Run_CLI.py

This file was deleted.

Loading