Conrad Lippert-Zajaczkowski
commited on
Commit
·
e31fd99
1
Parent(s):
229a1e9
accelerate
Browse files- requirements.txt +2 -1
- test_handler.py +13 -0
requirements.txt
CHANGED
@@ -4,4 +4,5 @@ pynvml
|
|
4 |
sentencepiece
|
5 |
tokenizers
|
6 |
torch
|
7 |
-
transformers==4.31.0
|
|
|
|
4 |
sentencepiece
|
5 |
tokenizers
|
6 |
torch
|
7 |
+
transformers==4.31.0
|
8 |
+
accelerate==0.21.0
|
test_handler.py
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"}
|
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)
|