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

simple compat for windows + one-click-install/run #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
- [ ] Colab demo
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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()
).launch(inbrowser=True)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
git+https://github.com/peterwilli/audio-maister.git
numpy==1.23.0
numpy==1.23.0
32 changes: 32 additions & 0 deletions windows-oneclick-webui.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@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
%python% -m pip install gradio==3.50.2
ECHO Dependencies installed.

REM Run the Python script
python app.py
) ELSE (
ECHO Failed to activate virtual environment.
)

REM Pause the command window
pause