Create test_handler
Browse files- test_handler +13 -0
test_handler
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from handler import EndpointHandler
|
| 2 |
+
|
| 3 |
+
# init handler
|
| 4 |
+
my_handler = EndpointHandler(path=".")
|
| 5 |
+
|
| 6 |
+
# prepare sample payload
|
| 7 |
+
non_holiday_payload = {"inputs": "I am quite excited how this will turn out", "date": "2022-08-08"}
|
| 8 |
+
|
| 9 |
+
# test the handler
|
| 10 |
+
non_holiday_pred=my_handler(non_holiday_payload)
|
| 11 |
+
|
| 12 |
+
# show results
|
| 13 |
+
print("non_holiday_pred", non_holiday_pred)
|