From 21b69ad676235c1ee6f0004cc17349896ef5940e Mon Sep 17 00:00:00 2001 From: Stepan Zuev Date: Fri, 5 Apr 2024 07:42:11 +0300 Subject: [PATCH] configurable tmp path --- README.md | 1 + gradio_app.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0626bbd..1f7ca11 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ pip install -r gradio_requirements.txt Run gradio server from terminal or [`gradio_app.ipynb`](./gradio_app.ipynb): ```bash 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). diff --git a/gradio_app.py b/gradio_app.py index d14433f..32b3e72 100644 --- a/gradio_app.py +++ b/gradio_app.py @@ -15,7 +15,7 @@ import random import uuid -TMP_PATH = "./demo/temp" +TMP_PATH = os.getenv("TMP_PATH", "./demo/temp") device = "cuda" if torch.cuda.is_available() else "cpu" whisper_model, align_model, voicecraft_model = None, None, None