Spaces:
Paused
Paused
Update backend/mongodb/models/calls.py
Browse files
backend/mongodb/models/calls.py
CHANGED
@@ -2,11 +2,7 @@ import uuid
|
|
2 |
from typing import List, Dict, Optional
|
3 |
from datetime import datetime
|
4 |
from pydantic import BaseModel, Field, PrivateAttr
|
5 |
-
|
6 |
import sys
|
7 |
-
# sys.path.append('/Users/benolojo/DCU/CA4/ca400_FinalYearProject/2024-ca400-olojob2-majdap2/src/backend/src/')
|
8 |
-
|
9 |
-
# from pydantic_mongo import ObjectIdField
|
10 |
|
11 |
|
12 |
''' Class for storing captions generated by SeamlessM4T'''
|
@@ -27,16 +23,8 @@ class UserCall(BaseModel):
|
|
27 |
creation_date: datetime = Field(default_factory=datetime.now, alias="date")
|
28 |
duration: Optional[int] = None # milliseconds
|
29 |
captions: Optional[List[UserCaptions]] = None
|
30 |
-
# captions: List[Dict[str, str | float]]
|
31 |
key_terms: Optional[List[str]] = None
|
32 |
|
33 |
-
'''Implement validation check on transcript ID if in transcript records'''
|
34 |
-
# @validator('transcript_id')
|
35 |
-
# def check_transcript_id_transcripts_collection(cls,transcript_id):
|
36 |
-
# transcript_ids=['',''] # check transcript_ids in collection
|
37 |
-
# if transcript_id not in transcript_ids:
|
38 |
-
# raise ValueError(f'transcript ID must be in {transcript_ids}')
|
39 |
-
# return transcript_id
|
40 |
|
41 |
class Config:
|
42 |
populate_by_name = True
|
|
|
2 |
from typing import List, Dict, Optional
|
3 |
from datetime import datetime
|
4 |
from pydantic import BaseModel, Field, PrivateAttr
|
|
|
5 |
import sys
|
|
|
|
|
|
|
6 |
|
7 |
|
8 |
''' Class for storing captions generated by SeamlessM4T'''
|
|
|
23 |
creation_date: datetime = Field(default_factory=datetime.now, alias="date")
|
24 |
duration: Optional[int] = None # milliseconds
|
25 |
captions: Optional[List[UserCaptions]] = None
|
|
|
26 |
key_terms: Optional[List[str]] = None
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
class Config:
|
30 |
populate_by_name = True
|