Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
erew123 authored Dec 25, 2023
1 parent 558583b commit 52a7922
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements_nvidia.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ requests>=2.31.0
tqdm>=4.66.1
importlib-metadata>=4.8.1
packaging>=23.2
pydantic>=2.5.0
pydantic>=1.10.13
2 changes: 1 addition & 1 deletion requirements_other.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ requests>=2.31.0
tqdm>=4.66.1
importlib-metadata>=4.8.1
packaging>=23.2
pydantic>=2.5.0
pydantic>=1.10.13
4 changes: 1 addition & 3 deletions tts_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from fastapi.staticfiles import StaticFiles
from jinja2 import Template
from contextlib import asynccontextmanager
from pydantic import field_validator

###########################
#### STARTUP VARIABLES ####
Expand Down Expand Up @@ -647,11 +646,10 @@ class JSONInput(BaseModel):
autoplay: bool = Field(..., description="autoplay needs to be a true or false value.")
autoplay_volume: float = Field(..., ge=0.1, le=1.0, description="autoplay_volume needs to be from 0.1 to 1.0")

@field_validator("autoplay_volume")
@classmethod
def validate_autoplay_volume(cls, value):
if not (0.1 <= value <= 1.0):
raise ValidationError("Autoplay volume must be between 0.1 and 1.0")
raise ValueError("Autoplay volume must be between 0.1 and 1.0")
return value


Expand Down

0 comments on commit 52a7922

Please sign in to comment.