Spaces:
Runtime error
Runtime error
Commit
·
6801092
1
Parent(s):
20d1fa8
Create schemas.py
Browse files- schemas.py +16 -0
schemas.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class SentimentResultBase(BaseModel):
|
| 2 |
+
positive_score: float
|
| 3 |
+
negative_score: float
|
| 4 |
+
neutral_score: float
|
| 5 |
+
|
| 6 |
+
class SentimentResultCreate(SentimentResultBase):
|
| 7 |
+
pass
|
| 8 |
+
|
| 9 |
+
class SentimentResult(SentimentResultBase):
|
| 10 |
+
id: int
|
| 11 |
+
created_at: datetime
|
| 12 |
+
user_id: int
|
| 13 |
+
text_id: int
|
| 14 |
+
|
| 15 |
+
class Config:
|
| 16 |
+
from_attributes = True
|