VeuReu commited on
Commit
b8045dd
·
verified ·
1 Parent(s): 121ca54

Update main_process/main_router.py

Browse files
Files changed (1) hide show
  1. main_process/main_router.py +4 -4
main_process/main_router.py CHANGED
@@ -19,7 +19,7 @@ from storage.embeddings_routers import get_embeddings_json
19
  EMBEDDINGS_ROOT = Path("/data/embeddings")
20
  MEDIA_ROOT = Path("/data/media")
21
  os.environ["CUDA_VISIBLE_DEVICES"] = "1"
22
- router = APIRouter(prefix="/transcription", tags=["Transcription Process"])
23
  HF_TOKEN = os.getenv("HF_TOKEN")
24
 
25
  def get_casting(video_sha1: str):
@@ -238,7 +238,7 @@ def pipeline_preprocessing_audio(video_path: str, voice_col):
238
 
239
  return full_transcription, diarization_info
240
 
241
- @router.post("/generate_srt", tags=["Transcription Process"])
242
  async def pipeline_video_analysis(
243
  sha1: str,
244
  token: str = Query(..., description="Token required for authorization")
@@ -363,7 +363,7 @@ def get_initial_srt_path(sha1:str):
363
 
364
  return final_path
365
 
366
- @router.get("/download_initial_srt", tags=["Transcription Process"])
367
  def download_initial_srt(
368
  sha1: str,
369
  token: str = Query(..., description="Token required for authorization")
@@ -388,7 +388,7 @@ def download_initial_srt(
388
  filename="initial.srt"
389
  )
390
 
391
- @router.get("/download_initial_info", tags=["Transcription Process"])
392
  def download_initial_info(
393
  sha1: str,
394
  token: str = Query(..., description="Token required for authorization")
 
19
  EMBEDDINGS_ROOT = Path("/data/embeddings")
20
  MEDIA_ROOT = Path("/data/media")
21
  os.environ["CUDA_VISIBLE_DEVICES"] = "1"
22
+ router = APIRouter(prefix="/transcription", tags=["Initial Transcription Process"])
23
  HF_TOKEN = os.getenv("HF_TOKEN")
24
 
25
  def get_casting(video_sha1: str):
 
238
 
239
  return full_transcription, diarization_info
240
 
241
+ @router.post("/generate_srt", tags=["Initial Transcription Process"])
242
  async def pipeline_video_analysis(
243
  sha1: str,
244
  token: str = Query(..., description="Token required for authorization")
 
363
 
364
  return final_path
365
 
366
+ @router.get("/download_initial_srt", tags=["Initial Transcription Process"])
367
  def download_initial_srt(
368
  sha1: str,
369
  token: str = Query(..., description="Token required for authorization")
 
388
  filename="initial.srt"
389
  )
390
 
391
+ @router.get("/download_initial_info", tags=["Initial Transcription Process"])
392
  def download_initial_info(
393
  sha1: str,
394
  token: str = Query(..., description="Token required for authorization")