Download predictor.py from dougdotcon/douvras-scientific-evidence-classifier: direct link, hf CLI and curl.
- Browser
- Download file 782 Bytes
-
https://huggingface.co/dougdotcon/douvras-scientific-evidence-classifier/resolve/main/predictor.py
- Command line
-
hf download hf://dougdotcon/douvras-scientific-evidence-classifier/predictor.py
-
curl -L -o predictor.py https://huggingface.co/dougdotcon/douvras-scientific-evidence-classifier/resolve/main/predictor.py
782 Bytes
| from __future__ import annotations | |
| import argparse, json | |
| def predict(text: str) -> str: | |
| t = text.casefold() | |
| if "proibido" in t or "extrapolação" in t: return "PROHIBITED_CLAIM" | |
| if "sem experimento" in t or "nenhuma métrica" in t or "evidência ausente" in t: return "UNVERIFIED" | |
| if "oposta" in t or "rejeitada" in t: return "FALSIFIED" | |
| if "holdout não distingue" in t or "sem poder" in t: return "REPLICATION_FAILED_INCONCLUSIVE" | |
| if "intervalo contém" in t or "baixa potência" in t: return "INCONCLUSIVE" | |
| return "SUPPORTED" | |
| def main() -> None: | |
| p = argparse.ArgumentParser(); p.add_argument("--text", required=True); a = p.parse_args() | |
| print(json.dumps({"verdict": predict(a.text)}, ensure_ascii=False)) | |
| if __name__ == "__main__": main() | |