configurable tmp path

This commit is contained in:
Stepan Zuev 2024-04-05 07:42:11 +03:00
parent 6f71fa65fb
commit 21b69ad676
2 changed files with 2 additions and 1 deletions

View File

@ -111,6 +111,7 @@ pip install -r gradio_requirements.txt
Run gradio server from terminal or [`gradio_app.ipynb`](./gradio_app.ipynb): Run gradio server from terminal or [`gradio_app.ipynb`](./gradio_app.ipynb):
```bash ```bash
python gradio_app.py python gradio_app.py
TMP_PATH=/tmp python gradio_app.py # if you want to change tmp folder path
``` ```
It is ready to use on [default url](http://127.0.0.1:7860). It is ready to use on [default url](http://127.0.0.1:7860).

View File

@ -15,7 +15,7 @@ import random
import uuid import uuid
TMP_PATH = "./demo/temp" TMP_PATH = os.getenv("TMP_PATH", "./demo/temp")
device = "cuda" if torch.cuda.is_available() else "cpu" device = "cuda" if torch.cuda.is_available() else "cpu"
whisper_model, align_model, voicecraft_model = None, None, None whisper_model, align_model, voicecraft_model = None, None, None