Skip to content

Commit

Permalink
Testing with new Gradio v5
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisewf committed Sep 30, 2024
1 parent e32c38d commit bf27f7f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@

def launch_gradio(port):
Applio.launch(
# ssr_mode=True,
favicon_path="assets/ICON.ico",
share="--share" in sys.argv,
inbrowser="--open" in sys.argv,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ transformers==4.44.2
# Visualization and UI
matplotlib==3.7.2
tensorboard
gradio==4.43.0
gradio==5.0.0b4

# Miscellaneous utilities
certifi==2024.7.4; sys_platform == 'darwin'
Expand Down
4 changes: 2 additions & 2 deletions run-install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo.
set "INSTALL_DIR=%cd%"
set "MINICONDA_DIR=%UserProfile%\Miniconda3"
set "ENV_DIR=%INSTALL_DIR%\env"
set "MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-py39_23.9.0-0-Windows-x86_64.exe"
set "MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-py310_24.7.1-0-Windows-x86_64.exe"
set "CONDA_EXE=%MINICONDA_DIR%\Scripts\conda.exe"

call :cleanup
Expand Down Expand Up @@ -49,7 +49,7 @@ exit /b 0

:create_conda_env
echo Creating Conda environment...
call "%MINICONDA_DIR%\_conda.exe" create --no-shortcuts -y -k --prefix "%ENV_DIR%" python=3.9
call "%MINICONDA_DIR%\_conda.exe" create --no-shortcuts -y -k --prefix "%ENV_DIR%" python=3.10
if errorlevel 1 goto :error
echo Conda environment created successfully.
echo.
Expand Down
2 changes: 1 addition & 1 deletion run-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ create_venv() {
py=$(which python3.10)
echo "Using python3.10"
else
if python --version | grep -qE "3\.(7|8|9|10)\."; then
if python --version | grep -qE "3\.(10)\."; then
py=$(which python)
echo "Using python"
else
Expand Down
4 changes: 4 additions & 0 deletions tabs/inference/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@


def update_sliders(preset):
if not preset:
return None, None, None, None, None
with open(
os.path.join(PRESETS_DIR, f"{preset}.json"), "r", encoding="utf-8"
) as json_file:
Expand All @@ -100,6 +102,8 @@ def update_sliders(preset):


def update_sliders_formant(preset):
if not preset:
return None, None
with open(
os.path.join(FORMANTSHIFT_DIR, f"{preset}.json"), "r", encoding="utf-8"
) as json_file:
Expand Down
6 changes: 6 additions & 0 deletions tabs/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
os.makedirs(custom_embedder_root, exist_ok=True)
os.makedirs(pretraineds_custom_path_relative, exist_ok=True)

initial_load = True

def get_pretrained_list(suffix):
return [
Expand Down Expand Up @@ -874,6 +875,11 @@ def disable_stop_train_button():
}

def download_prerequisites(version, pitch_guidance):
global initial_load
if initial_load:
initial_load = False
return

if version == "v1":
if pitch_guidance:
gr.Info(
Expand Down

0 comments on commit bf27f7f

Please sign in to comment.