Spaces:
Running
Running
Download export.py from EugeneXiang/ECHOscore: direct link, hf CLI and curl.
- Browser
- Download file 443 Bytes
-
https://huggingface.co/spaces/EugeneXiang/ECHOscore/resolve/main/export.py
- Command line
-
hf download hf://spaces/EugeneXiang/ECHOscore/export.py
-
curl -L -o export.py https://huggingface.co/spaces/EugeneXiang/ECHOscore/resolve/main/export.py
443 Bytes
| import pandas as pd | |
| import tempfile | |
| from config import DIMS | |
| def export_csv(subj: list, oval: list, deep: list) -> str: | |
| """Build DataFrame and save to temp CSV, return file path""" | |
| df = pd.DataFrame({ | |
| "Dimension": DIMS, | |
| "Subjective": subj, | |
| "OVAL": oval, | |
| "DeepEval": deep | |
| }) | |
| tmp = tempfile.NamedTemporaryFile(delete=False, suffix=".csv") | |
| df.to_csv(tmp.name, index=False) | |
| return tmp.name | |