Spaces:
Runtime error
Runtime error
Update server/app.py
Browse files- server/app.py +8 -1
server/app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from pydantic import BaseModel
|
| 3 |
import random
|
|
@@ -90,4 +91,10 @@ def step(action: Action):
|
|
| 90 |
"hard": score_hard
|
| 91 |
},
|
| 92 |
"done": current_state.step_count >= 15 # End episode after 15 steps
|
| 93 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import uvicorn
|
| 2 |
from fastapi import FastAPI
|
| 3 |
from pydantic import BaseModel
|
| 4 |
import random
|
|
|
|
| 91 |
"hard": score_hard
|
| 92 |
},
|
| 93 |
"done": current_state.step_count >= 15 # End episode after 15 steps
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
def main():
|
| 97 |
+
uvicorn.run("server.app:app", host="0.0.0.0", port=7860)
|
| 98 |
+
|
| 99 |
+
if __name__ == "__main__":
|
| 100 |
+
main()
|