File size: 433 Bytes
7c28b65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""SETA server entrypoint.

The openreward Server defaults to 0.0.0.0:8080. HF Spaces injects a PORT
env var when present — we honor that so the same image runs on Spaces
and on platforms that pick a port at runtime.
"""

import os

from openreward.environments import Server

from seta import SETAEnv


if __name__ == "__main__":
    port = int(os.environ.get("PORT", "8080"))
    Server([SETAEnv]).run(host="0.0.0.0", port=port)