Spaces:
Runtime error
Runtime error
Download src/utils.py from sim-so/semantle-jp-with-chat: direct link, hf CLI and curl.
- Browser
- Download file 258 Bytes
-
https://huggingface.co/spaces/sim-so/semantle-jp-with-chat/resolve/main/src/utils.py
- Command line
-
hf download hf://spaces/sim-so/semantle-jp-with-chat/src/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/sim-so/semantle-jp-with-chat/resolve/main/src/utils.py
258 Bytes
| def format_result(word, sim, rank): | |
| return f"{word}: スコア {sim}, ランク {rank}" | |
| def format_table(table, n_rows=10): | |
| top_results = table.sort_values(by="スコア", ascending=False).head(n_rows) | |
| return top_results.to_markdown(index=False) |