Spaces:
Sleeping
Sleeping
Update app/app.py
Browse files- app/app.py +0 -194
app/app.py
CHANGED
|
@@ -200,200 +200,6 @@ def override_predictions(claim, model_key, result):
|
|
| 200 |
# Normalized claim for case-insensitive matching
|
| 201 |
normalized_claim = claim.lower().strip()
|
| 202 |
|
| 203 |
-
# Dictionary of known claims and their correct classifications by model
|
| 204 |
-
known_claims = {
|
| 205 |
-
# Basic Claims
|
| 206 |
-
"the earth is flat": {
|
| 207 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.942},
|
| 208 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.978},
|
| 209 |
-
"deberta_liar": {"label": "pants-fire", "confidence": 0.935}
|
| 210 |
-
},
|
| 211 |
-
"the earth is not flat": {
|
| 212 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.583},
|
| 213 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.894},
|
| 214 |
-
"deberta_liar": {"label": "true", "confidence": 0.849}
|
| 215 |
-
},
|
| 216 |
-
"the earth is round": {
|
| 217 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.887},
|
| 218 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.962},
|
| 219 |
-
"deberta_liar": {"label": "true", "confidence": 0.924}
|
| 220 |
-
},
|
| 221 |
-
"paris is in europe": {
|
| 222 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.913},
|
| 223 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.945},
|
| 224 |
-
"deberta_liar": {"label": "true", "confidence": 0.898}
|
| 225 |
-
},
|
| 226 |
-
"humans need oxygen to survive": {
|
| 227 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.961},
|
| 228 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.957},
|
| 229 |
-
"deberta_liar": {"label": "true", "confidence": 0.923}
|
| 230 |
-
},
|
| 231 |
-
|
| 232 |
-
# Politics/Sensitive Content
|
| 233 |
-
"women get paid less than men": {
|
| 234 |
-
"distilbert_fever": {"label": "NOT ENOUGH INFO", "confidence": 0.614},
|
| 235 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.589},
|
| 236 |
-
"deberta_liar": {"label": "mostly-true", "confidence": 0.768}
|
| 237 |
-
},
|
| 238 |
-
"vaccines cause autism": {
|
| 239 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.897},
|
| 240 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.953},
|
| 241 |
-
"deberta_liar": {"label": "half-true", "confidence": 0.526}
|
| 242 |
-
},
|
| 243 |
-
|
| 244 |
-
# Conditional/Hypotheticals
|
| 245 |
-
"ai will replace most jobs": {
|
| 246 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.632},
|
| 247 |
-
"roberta_fever": {"label": "NOT ENOUGH INFO", "confidence": 0.641},
|
| 248 |
-
"deberta_liar": {"label": "true", "confidence": 0.698}
|
| 249 |
-
},
|
| 250 |
-
"free healthcare would improve public health": {
|
| 251 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.623},
|
| 252 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.687},
|
| 253 |
-
"deberta_liar": {"label": "half-true", "confidence": 0.724}
|
| 254 |
-
},
|
| 255 |
-
|
| 256 |
-
# Opinions/Subjectivity
|
| 257 |
-
"green is the best color": {
|
| 258 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.483},
|
| 259 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.526},
|
| 260 |
-
"deberta_liar": {"label": "barely-true", "confidence": 0.475}
|
| 261 |
-
},
|
| 262 |
-
|
| 263 |
-
# Comparatives/Superlatives
|
| 264 |
-
"apple is better than windows": {
|
| 265 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.576},
|
| 266 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.524},
|
| 267 |
-
"deberta_liar": {"label": "mostly-true", "confidence": 0.683}
|
| 268 |
-
},
|
| 269 |
-
|
| 270 |
-
# Evolving Truths
|
| 271 |
-
"pluto is a planet": {
|
| 272 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.634},
|
| 273 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.778},
|
| 274 |
-
"deberta_liar": {"label": "false", "confidence": 0.692}
|
| 275 |
-
},
|
| 276 |
-
|
| 277 |
-
# Linguistic Hedges
|
| 278 |
-
"coffee might reduce the risk of cancer": {
|
| 279 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.678},
|
| 280 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.735},
|
| 281 |
-
"deberta_liar": {"label": "true", "confidence": 0.719}
|
| 282 |
-
},
|
| 283 |
-
|
| 284 |
-
# New Info
|
| 285 |
-
"israel broke its ceasefire agreement with hamas": {
|
| 286 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.685},
|
| 287 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.623},
|
| 288 |
-
"deberta_liar": {"label": "true", "confidence": 0.694}
|
| 289 |
-
},
|
| 290 |
-
"donald trump placed a 34% tariff on chinese imports": {
|
| 291 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.587},
|
| 292 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.612},
|
| 293 |
-
"deberta_liar": {"label": "mostly-true", "confidence": 0.608}
|
| 294 |
-
},
|
| 295 |
-
|
| 296 |
-
# Modals
|
| 297 |
-
"the government should reduce taxes": {
|
| 298 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.612},
|
| 299 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.587},
|
| 300 |
-
"deberta_liar": {"label": "true", "confidence": 0.631}
|
| 301 |
-
},
|
| 302 |
-
"children might develop better social skills through team sports": {
|
| 303 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.643},
|
| 304 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.782},
|
| 305 |
-
"deberta_liar": {"label": "mostly-true", "confidence": 0.727}
|
| 306 |
-
},
|
| 307 |
-
|
| 308 |
-
# Nested Claims
|
| 309 |
-
"scientists who claimed vaccines cause autism have been discredited": {
|
| 310 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.552},
|
| 311 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.798},
|
| 312 |
-
"deberta_liar": {"label": "half-true", "confidence": 0.636}
|
| 313 |
-
},
|
| 314 |
-
"the idea that the moon landing was fake has been debunked": {
|
| 315 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.524},
|
| 316 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.851},
|
| 317 |
-
"deberta_liar": {"label": "true", "confidence": 0.789}
|
| 318 |
-
},
|
| 319 |
-
|
| 320 |
-
# Intensifiers or Adverbs of Degree
|
| 321 |
-
"fast food is literally poison for your body": {
|
| 322 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.531},
|
| 323 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.765},
|
| 324 |
-
"deberta_liar": {"label": "half-true", "confidence": 0.582}
|
| 325 |
-
},
|
| 326 |
-
"exercise is practically a cure for everything": {
|
| 327 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.658},
|
| 328 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.613},
|
| 329 |
-
"deberta_liar": {"label": "mostly-true", "confidence": 0.687}
|
| 330 |
-
},
|
| 331 |
-
|
| 332 |
-
# Epistemic Modals Signaling Uncertainty
|
| 333 |
-
"there is possibly life on other planets": {
|
| 334 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.635},
|
| 335 |
-
"roberta_fever": {"label": "NOT ENOUGH INFO", "confidence": 0.782},
|
| 336 |
-
"deberta_liar": {"label": "true", "confidence": 0.538}
|
| 337 |
-
},
|
| 338 |
-
"it is uncertain whether dark matter exists": {
|
| 339 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.584},
|
| 340 |
-
"roberta_fever": {"label": "NOT ENOUGH INFO", "confidence": 0.826},
|
| 341 |
-
"deberta_liar": {"label": "false", "confidence": 0.595}
|
| 342 |
-
},
|
| 343 |
-
|
| 344 |
-
# Superlatives/Comparatives
|
| 345 |
-
"mount everest is the tallest mountain in the world": {
|
| 346 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.863},
|
| 347 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.597},
|
| 348 |
-
"deberta_liar": {"label": "true", "confidence": 0.842}
|
| 349 |
-
},
|
| 350 |
-
"the united states spends more on healthcare than any other country": {
|
| 351 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.725},
|
| 352 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.768},
|
| 353 |
-
"deberta_liar": {"label": "false", "confidence": 0.513}
|
| 354 |
-
},
|
| 355 |
-
|
| 356 |
-
# Conditionals
|
| 357 |
-
"if temperatures continue to rise, sea levels will increase": {
|
| 358 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.716},
|
| 359 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.753},
|
| 360 |
-
"deberta_liar": {"label": "pants-fire", "confidence": 0.589}
|
| 361 |
-
},
|
| 362 |
-
"should the economy collapse, unemployment would rise dramatically": {
|
| 363 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.568},
|
| 364 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.692},
|
| 365 |
-
"deberta_liar": {"label": "half-true", "confidence": 0.547}
|
| 366 |
-
},
|
| 367 |
-
|
| 368 |
-
# Negation
|
| 369 |
-
"no one has ever reached the center of the earth": {
|
| 370 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.529},
|
| 371 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.854},
|
| 372 |
-
"deberta_liar": {"label": "true", "confidence": 0.817}
|
| 373 |
-
},
|
| 374 |
-
"not all birds can fly": {
|
| 375 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.536},
|
| 376 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.781},
|
| 377 |
-
"deberta_liar": {"label": "true", "confidence": 0.774}
|
| 378 |
-
},
|
| 379 |
-
|
| 380 |
-
# Additional examples for variety
|
| 381 |
-
"the sun is a star": {
|
| 382 |
-
"distilbert_fever": {"label": "SUPPORTS", "confidence": 0.927},
|
| 383 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.942},
|
| 384 |
-
"deberta_liar": {"label": "true", "confidence": 0.914}
|
| 385 |
-
},
|
| 386 |
-
"australia is both a country and a continent": {
|
| 387 |
-
"distilbert_fever": {"label": "NOT ENOUGH INFO", "confidence": 0.612},
|
| 388 |
-
"roberta_fever": {"label": "SUPPORTS", "confidence": 0.891},
|
| 389 |
-
"deberta_liar": {"label": "true", "confidence": 0.834}
|
| 390 |
-
},
|
| 391 |
-
"the moon is made of cheese": {
|
| 392 |
-
"distilbert_fever": {"label": "REFUTES", "confidence": 0.956},
|
| 393 |
-
"roberta_fever": {"label": "REFUTES", "confidence": 0.975},
|
| 394 |
-
"deberta_liar": {"label": "pants-fire", "confidence": 0.946}
|
| 395 |
-
}
|
| 396 |
-
}
|
| 397 |
|
| 398 |
# Check for normalized match
|
| 399 |
if normalized_claim in known_claims and model_key in known_claims[normalized_claim]:
|
|
|
|
| 200 |
# Normalized claim for case-insensitive matching
|
| 201 |
normalized_claim = claim.lower().strip()
|
| 202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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