Spaces:
Runtime error
Runtime error
File size: 540 Bytes
8f54b3b 1765a9a 8f54b3b 1765a9a 8f54b3b d2d2822 8f54b3b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/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
|