flowgraph / run.py
kbsss's picture
Upload folder using huggingface_hub
7b2787b verified
#!/usr/bin/env python3
"""
Simple run script for the Workflow Engine.
Usage:
python run.py
Or with custom settings:
HOST=127.0.0.1 PORT=8080 python run.py
"""
import uvicorn
import os
def main():
"""Run the FastAPI application."""
host = os.getenv("HOST", "0.0.0.0")
port = int(os.getenv("PORT", "8000"))
reload = os.getenv("RELOAD", "true").lower() == "true"
print(f"""
╔═══════════════════════════════════════════════════════════════╗
β•‘ FlowGraph πŸ”„ β•‘
β•‘ β•‘
β•‘ A lightweight workflow orchestration engine β•‘
╠═══════════════════════════════════════════════════════════════╣
β•‘ Server: http://{host}:{port} β•‘
β•‘ API Docs: http://{host}:{port}/docs β•‘
β•‘ ReDoc: http://{host}:{port}/redoc β•‘
╠═══════════════════════════════════════════════════════════════╣
β•‘ Demo workflow ID: code-review-demo β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
""")
uvicorn.run(
"app.main:app",
host=host,
port=port,
reload=reload,
log_level="info",
)
if __name__ == "__main__":
main()