File size: 541 Bytes
c034083
db2db2a
 
 
 
 
 
 
 
 
c034083
db2db2a
 
 
 
 
 
 
 
 
 
 
 
c034083
db2db2a
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from pydantic import BaseModel, HttpUrl
from typing import List


class ClassificationInput(BaseModel):
    user_id: str
    text: List[str]

class ImageInput(BaseModel):
    user_id: str
    url: List[HttpUrl]


class ClassificationOutput(BaseModel):
    user_id: str
    text: List[str]
    model_name: str
    sentiment: List[str]
    score: List[float]
    prediction_time: int

class ImageOutput(BaseModel):
    user_id: str
    url: List[HttpUrl]
    model_name: str
    label: List[str]
    score: List[float]
    prediction_time: int