Spaces:
Runtime error
Runtime error
Download src/test_utils.py from Gradio-Blocks/ML-Aided-Code-Analysis: direct link, hf CLI and curl.
- Browser
- Download file 306 Bytes
-
https://huggingface.co/spaces/Gradio-Blocks/ML-Aided-Code-Analysis/resolve/main/src/test_utils.py
- Command line
-
hf download hf://spaces/Gradio-Blocks/ML-Aided-Code-Analysis/src/test_utils.py
-
curl -L -o test_utils.py https://huggingface.co/spaces/Gradio-Blocks/ML-Aided-Code-Analysis/resolve/main/src/test_utils.py
306 Bytes
| from src.utils import GenCode, Config | |
| code_gen_class = GenCode(Config.code_gen_idt, gen_kwargs={}) | |
| def test_gen_code(): | |
| code_snippet = "def dataset_name():\n return 'test'" | |
| generated_code = code_gen_class(code_snippet) | |
| print(generated_code) | |
| if __name__ == "__main__": | |
| test_gen_code() |