Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -128,33 +128,13 @@ if (runModel=='1'):
|
|
| 128 |
# Evaluate the model
|
| 129 |
trainer.evaluate()
|
| 130 |
|
| 131 |
-
#label_mapping = {
|
| 132 |
-
#0: "lastmonth",
|
| 133 |
-
#1: "nextweek",
|
| 134 |
-
#2: "sevendays",
|
| 135 |
-
#3: "today",
|
| 136 |
-
#4: "tomorrow",
|
| 137 |
-
#5: "yesterday"
|
| 138 |
-
#}
|
| 139 |
label_mapping = {
|
| 140 |
-
0: "
|
| 141 |
-
1: "
|
| 142 |
-
2: "
|
| 143 |
-
3: "
|
| 144 |
-
4: "
|
| 145 |
-
5: "
|
| 146 |
-
6: "sevendays",
|
| 147 |
-
7: "sixdays",
|
| 148 |
-
8: "tenyears",
|
| 149 |
-
9: "threedays",
|
| 150 |
-
10: "threeweeks",
|
| 151 |
-
11: "threemonths",
|
| 152 |
-
12: "thismonth",
|
| 153 |
-
13: "thisweek",
|
| 154 |
-
14: "twodays",
|
| 155 |
-
15: "twomonths",
|
| 156 |
-
16: "twoweeks",
|
| 157 |
-
|
| 158 |
}
|
| 159 |
|
| 160 |
|
|
@@ -284,34 +264,13 @@ else:
|
|
| 284 |
|
| 285 |
#Define the label mappings (this must match the mapping used during training)
|
| 286 |
|
| 287 |
-
#label_mapping = {
|
| 288 |
-
#0: "lastmonth",
|
| 289 |
-
#1: "nextweek",
|
| 290 |
-
#2: "sevendays",
|
| 291 |
-
#3: "today",
|
| 292 |
-
#4: "tomorrow",
|
| 293 |
-
#5: "yesterday"
|
| 294 |
-
#}
|
| 295 |
-
|
| 296 |
label_mapping = {
|
| 297 |
-
0: "
|
| 298 |
-
1: "
|
| 299 |
-
2: "
|
| 300 |
-
3: "
|
| 301 |
-
4: "
|
| 302 |
-
5: "
|
| 303 |
-
6: "sevendays",
|
| 304 |
-
7: "sixdays",
|
| 305 |
-
8: "tenyears",
|
| 306 |
-
9: "threedays",
|
| 307 |
-
10: "threeweeks",
|
| 308 |
-
11: "threemonths",
|
| 309 |
-
12: "thismonth",
|
| 310 |
-
13: "thisweek",
|
| 311 |
-
14: "twodays",
|
| 312 |
-
15: "twomonths",
|
| 313 |
-
16: "twoweeks",
|
| 314 |
-
|
| 315 |
}
|
| 316 |
|
| 317 |
#Function to classify user input
|
|
|
|
| 128 |
# Evaluate the model
|
| 129 |
trainer.evaluate()
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
label_mapping = {
|
| 132 |
+
0: "lastmonth",
|
| 133 |
+
1: "nextweek",
|
| 134 |
+
2: "sevendays",
|
| 135 |
+
3: "today",
|
| 136 |
+
4: "tomorrow",
|
| 137 |
+
5: "yesterday"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
}
|
| 139 |
|
| 140 |
|
|
|
|
| 264 |
|
| 265 |
#Define the label mappings (this must match the mapping used during training)
|
| 266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
label_mapping = {
|
| 268 |
+
0: "lastmonth",
|
| 269 |
+
1: "nextweek",
|
| 270 |
+
2: "sevendays",
|
| 271 |
+
3: "today",
|
| 272 |
+
4: "tomorrow",
|
| 273 |
+
5: "yesterday"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 274 |
}
|
| 275 |
|
| 276 |
#Function to classify user input
|