From 137a413b8fd3401b8c7873933677304a4ba9bc85 Mon Sep 17 00:00:00 2001 From: Sam A <98753696+samfisherirl@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:43:35 -0400 Subject: [PATCH 1/4] Update requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f721e11..47b8f98 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ git+https://github.com/peterwilli/audio-maister.git -numpy==1.23.0 \ No newline at end of file +numpy==1.23.0 +gradio==3.50.2 From 013f27349c5bd34d6065506999567434ef254d36 Mon Sep 17 00:00:00 2001 From: Sam A <98753696+samfisherirl@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:54:27 -0400 Subject: [PATCH 2/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ad1d9b..1e39b05 100755 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Thanks to an improved augmentation and training loop, as well as a new dataset, ## Requirements - - Basic knowledge of a (Linux) terminal + - ~~Basic knowledge of a (Linux) terminal~~ - Working git, python3 and pytorch installation (other dependencies automatically are installed) ## Inference @@ -78,4 +78,4 @@ Not only will you get the satisfaction of supporting an individual's passions, b - [ ] Releasing training code + tutorial - [x] HF space! (Thanks to @adolinska!) -- [ ] Colab demo \ No newline at end of file +- [ ] Colab demo From be34e473ec96a69ac9344b6477eda1551e537c83 Mon Sep 17 00:00:00 2001 From: Sam A <98753696+samfisherirl@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:04:00 -0400 Subject: [PATCH 3/4] _windows_compat --- app.py | 4 +++- requirements.txt | 2 +- windows-oneclick-webui.bat | 31 +++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 windows-oneclick-webui.bat diff --git a/app.py b/app.py index 84dad1a..8b912a2 100644 --- a/app.py +++ b/app.py @@ -30,6 +30,8 @@ def inference(input_file, **kwargs): if USE_CUDA: main_model.to('cuda') inference_model.to('cuda') + else: + print('error loading model to cuda') return "out.wav" @@ -54,4 +56,4 @@ def inference(input_file, **kwargs): description = desc, article = made, theme=gr.themes.Soft(primary_hue="purple",secondary_hue="violet", neutral_hue="neutral") -).launch() \ No newline at end of file +).launch(inbrowser=True) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 47b8f98..a15043c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ git+https://github.com/peterwilli/audio-maister.git numpy==1.23.0 -gradio==3.50.2 +gradio==3.50.2 \ No newline at end of file diff --git a/windows-oneclick-webui.bat b/windows-oneclick-webui.bat new file mode 100644 index 0000000..8ede074 --- /dev/null +++ b/windows-oneclick-webui.bat @@ -0,0 +1,31 @@ +@echo off +SET venv_dir=venv +SET pyfile=main.py +SET python=%venv_dir%\Scripts\python.exe + +REM Check if the virtual environment directory exists +IF EXIST "%venv_dir%\Scripts\activate.bat" ( + ECHO Virtual environment found. Activating... + CALL %venv_dir%\Scripts\activate.bat +) ELSE ( + ECHO Creating virtual environment... + python -m venv %venv_dir% + CALL %venv_dir%\Scripts\activate.bat +) + +REM Check if the virtual environment is activated +IF NOT "%VIRTUAL_ENV%" == "" ( + ECHO Virtual environment activated. + ECHO Installing dependencies... + %python% -m pip install --upgrade pip + %python% -m pip install -r requirements.txt + ECHO Dependencies installed. + + REM Run the Python script + python app.py +) ELSE ( + ECHO Failed to activate virtual environment. +) + +REM Pause the command window +pause From 1255cd586a6c2ea493c8e6c6f37445d61746a5ab Mon Sep 17 00:00:00 2001 From: Sam A <98753696+samfisherirl@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:08:23 -0400 Subject: [PATCH 4/4] remove_gradio_add_to_oneclick --- requirements.txt | 3 +-- windows-oneclick-webui.bat | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index a15043c..fdba1d5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ git+https://github.com/peterwilli/audio-maister.git -numpy==1.23.0 -gradio==3.50.2 \ No newline at end of file +numpy==1.23.0 \ No newline at end of file diff --git a/windows-oneclick-webui.bat b/windows-oneclick-webui.bat index 8ede074..3991357 100644 --- a/windows-oneclick-webui.bat +++ b/windows-oneclick-webui.bat @@ -18,7 +18,8 @@ IF NOT "%VIRTUAL_ENV%" == "" ( ECHO Virtual environment activated. ECHO Installing dependencies... %python% -m pip install --upgrade pip - %python% -m pip install -r requirements.txt + %python% -m pip install -r requirements.txt + %python% -m pip install gradio==3.50.2 ECHO Dependencies installed. REM Run the Python script