Skip to content

Commit

Permalink
Merge pull request #116 from Aydinhamedi/Beta-b
Browse files Browse the repository at this point in the history
Beta b
  • Loading branch information
Aydinhamedi authored Jan 25, 2024
2 parents ea1a9e5 + 376a70e commit f27ee61
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 36 deletions.
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.

0 comments on commit f27ee61

Please sign in to comment.