Spaces:
Runtime error
Runtime error
Download mycoder/src/inner/main.py from russkiyximik/query2plot: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/spaces/russkiyximik/query2plot/resolve/main/mycoder/src/inner/main.py
- Command line
-
hf download hf://spaces/russkiyximik/query2plot/mycoder/src/inner/main.py
-
curl -L -o main.py https://huggingface.co/spaces/russkiyximik/query2plot/resolve/main/mycoder/src/inner/main.py
540 Bytes
| #!/usr/bin/env python | |
| import warnings | |
| from .crew import Coder | |
| from .paths import OUTPUT_DIR | |
| warnings.filterwarnings("ignore", category=SyntaxWarning, module="pysbd") | |
| # Create output directory if it doesn't exist | |
| OUTPUT_DIR.mkdir(exist_ok=True) | |
| # Try to see if HF Space secret can be used | |
| import dotenv | |
| dotenv.load_dotenv() | |
| def run(query: str): | |
| """ | |
| Run the crew. | |
| """ | |
| inputs = { | |
| 'assignment': query, | |
| } | |
| result = Coder().crew().kickoff(inputs=inputs) | |
| print(result.raw) | |
| return result | |