EnergyStock / server /app.py
saiteja020's picture
HF spcaes done
9156e05
Raw
History Blame Contribute Delete
469 Bytes
import os
import sys
_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if _ROOT not in sys.path:
sys.path.insert(0, _ROOT)
def main():
import uvicorn
# Important: OpenEnv validation requires starting the uvicorn hook through main() block
uvicorn.run(
"app:app",
host="0.0.0.0",
port=int(os.getenv("PORT", 7860)),
reload=False,
log_level="info",
)
if __name__ == "__main__":
main()