feat(srt translation): add api for srt translation
This commit is contained in:
19
app/models/srt_translation.py
Normal file
19
app/models/srt_translation.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Optional
|
||||
|
||||
class SRTSubtitle(BaseModel):
|
||||
index: int
|
||||
timestamp: str
|
||||
japanese_text: str
|
||||
english_translation: Optional[str] = None
|
||||
|
||||
class SRTTranslationRequest(BaseModel):
|
||||
input_path: str
|
||||
output_path: Optional[str] = None
|
||||
target_language: str = "en" # Default to English
|
||||
|
||||
class SRTTranslationResponse(BaseModel):
|
||||
success: bool
|
||||
message: str
|
||||
output_path: str
|
||||
total_subtitles: int
|
||||
@@ -1,5 +1,8 @@
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
class BPOMMobileResponseTextGenerationRequest(BaseModel):
|
||||
text: str
|
||||
|
||||
class BPOMMobileResponseTextGenerationRequest(BaseModel):
|
||||
class BPOMMobileResponseTextGenerationResponse(BaseModel):
|
||||
generated_text: str
|
||||
Reference in New Issue
Block a user