malek-messaoudii
commited on
Commit
·
ad2dc28
1
Parent(s):
8a40c79
Update label.py
Browse files- models/label.py +15 -15
models/label.py
CHANGED
|
@@ -9,8 +9,8 @@ class PredictionRequest(BaseModel):
|
|
| 9 |
model_config = ConfigDict(
|
| 10 |
json_schema_extra={
|
| 11 |
"example": {
|
| 12 |
-
"argument": "
|
| 13 |
-
"key_point": "
|
| 14 |
}
|
| 15 |
}
|
| 16 |
)
|
|
@@ -31,11 +31,11 @@ class PredictionResponse(BaseModel):
|
|
| 31 |
json_schema_extra={
|
| 32 |
"example": {
|
| 33 |
"prediction": 1,
|
| 34 |
-
"confidence": 0.
|
| 35 |
"label": "apparie",
|
| 36 |
"probabilities": {
|
| 37 |
-
"non_apparie": 0.
|
| 38 |
-
"apparie": 0.
|
| 39 |
}
|
| 40 |
}
|
| 41 |
}
|
|
@@ -57,24 +57,24 @@ class BatchPredictionRequest(BaseModel):
|
|
| 57 |
"example": {
|
| 58 |
"pairs": [
|
| 59 |
{
|
| 60 |
-
"argument": "
|
| 61 |
-
"key_point": "
|
| 62 |
},
|
| 63 |
{
|
| 64 |
-
"argument": "
|
| 65 |
-
"key_point": "
|
| 66 |
},
|
| 67 |
{
|
| 68 |
-
"argument": "
|
| 69 |
-
"key_point": "
|
| 70 |
},
|
| 71 |
{
|
| 72 |
-
"argument": "
|
| 73 |
-
"key_point": "
|
| 74 |
},
|
| 75 |
{
|
| 76 |
-
"argument": "
|
| 77 |
-
"key_point": "
|
| 78 |
}
|
| 79 |
]
|
| 80 |
}
|
|
|
|
| 9 |
model_config = ConfigDict(
|
| 10 |
json_schema_extra={
|
| 11 |
"example": {
|
| 12 |
+
"argument": "School uniforms limit students' creativity",
|
| 13 |
+
"key_point": "Uniforms restrict personal freedom"
|
| 14 |
}
|
| 15 |
}
|
| 16 |
)
|
|
|
|
| 31 |
json_schema_extra={
|
| 32 |
"example": {
|
| 33 |
"prediction": 1,
|
| 34 |
+
"confidence": 0.956,
|
| 35 |
"label": "apparie",
|
| 36 |
"probabilities": {
|
| 37 |
+
"non_apparie": 0.044,
|
| 38 |
+
"apparie": 0.956
|
| 39 |
}
|
| 40 |
}
|
| 41 |
}
|
|
|
|
| 57 |
"example": {
|
| 58 |
"pairs": [
|
| 59 |
{
|
| 60 |
+
"argument": "Students should wear school uniforms",
|
| 61 |
+
"key_point": "School uniforms are good for students"
|
| 62 |
},
|
| 63 |
{
|
| 64 |
+
"argument": "We need more renewable energy",
|
| 65 |
+
"key_point": "Solar and wind power are important"
|
| 66 |
},
|
| 67 |
{
|
| 68 |
+
"argument": "Education should be free for everyone",
|
| 69 |
+
"key_point": "Cars should be electric"
|
| 70 |
},
|
| 71 |
{
|
| 72 |
+
"argument": "Exercise improves health",
|
| 73 |
+
"key_point": "Physical activity is good for the body"
|
| 74 |
},
|
| 75 |
{
|
| 76 |
+
"argument": "Reading books helps learning",
|
| 77 |
+
"key_point": "We should build more parks"
|
| 78 |
}
|
| 79 |
]
|
| 80 |
}
|