mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00
Flexible UI port
This commit is contained in:
parent
880fa7ad53
commit
0db7b73678
3 changed files with 8 additions and 1 deletions
|
@ -35,3 +35,5 @@ services:
|
|||
- GRADIO_WATCH=True # Enable hot reloading
|
||||
- PYTHONUNBUFFERED=1 # Ensure Python output is not buffered
|
||||
- DISABLE_LOCAL_SAVING=false # Set to 'true' to disable local saving and hide file view
|
||||
- API_HOST=kokoro-tts # Set TTS service URL
|
||||
- API_PORT=8880 # Set TTS service PORT
|
||||
|
|
|
@ -11,5 +11,8 @@ RUN mkdir -p data/inputs data/outputs
|
|||
# Copy the application files
|
||||
COPY . .
|
||||
|
||||
ENV API_HOST=kokoro-tts
|
||||
ENV API_PORT=8880
|
||||
|
||||
# Run the Gradio app
|
||||
CMD ["python", "app.py"]
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import os
|
||||
|
||||
# API Configuration
|
||||
API_URL = "http://kokoro-tts:8880"
|
||||
API_HOST = os.getenv("API_HOST", "kokoro-tts")
|
||||
API_PORT = os.getenv("API_PORT", "8880")
|
||||
API_URL = f"http://{API_HOST}:{API_PORT}"
|
||||
|
||||
# File paths
|
||||
INPUTS_DIR = "/app/ui/data/inputs"
|
||||
|
|
Loading…
Add table
Reference in a new issue