Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Thuillier authored and Victor Thuillier committed Feb 15, 2024
1 parent 3e06514 commit 1098b76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
whisper_arch = "./models/faster-whisper-large-v3"


class ModelOutput(BaseModel):
class Output(BaseModel):
segments: Any
detected_language: str

Expand Down Expand Up @@ -88,7 +88,7 @@ def predict(
debug: bool = Input(
description="Print out compute/inference times and memory usage information",
default=False)
) -> ModelOutput:
) -> Output:
with torch.inference_mode():
asr_options = {
"temperatures": [temperature],
Expand Down Expand Up @@ -166,7 +166,7 @@ def predict(
if debug:
print(f"max gpu memory allocated over runtime: {torch.cuda.max_memory_reserved() / (1024 ** 3):.2f} GB")

return ModelOutput(
return Output(
segments=result["segments"],
detected_language=detected_language
)
Expand Down

0 comments on commit 1098b76

Please sign in to comment.