atkiya110 commited on
Commit
dd738fa
·
verified ·
1 Parent(s): bf30891

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from sanic import Sanic
2
+ from sanic.response import json as sanic_json
3
+ import rasa_sdk.endpoint as endpoint
4
+ from rasa_sdk.executor import ActionExecutor
5
+
6
+ # Create the action server app
7
+ app = endpoint.create_app(
8
+ action_package_name="actions",
9
+ )
10
+
11
+ # ✅ Add a root route for Hugging Face health check
12
+ @app.get("/")
13
+ async def root(request):
14
+ return sanic_json({"status": "ok", "message": "Rasa Action Server is running"})
15
+
16
+ if __name__ == "__main__":
17
+ app.run(host="0.0.0.0", port=7860)