Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import json
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
class
|
| 5 |
def __init__(self):
|
| 6 |
"""
|
| 7 |
Initialize the handler by setting up the summarization pipeline.
|
|
@@ -56,7 +56,7 @@ class EndpontHandler():
|
|
| 56 |
|
| 57 |
|
| 58 |
# Example usage:
|
| 59 |
-
# handler =
|
| 60 |
# handler.load_model("path_to_your_model_directory")
|
| 61 |
# result = handler(json.dumps({"text": "Your input text here"}))
|
| 62 |
# print(result)
|
|
|
|
| 1 |
import json
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
class EndpointHandler:
|
| 5 |
def __init__(self):
|
| 6 |
"""
|
| 7 |
Initialize the handler by setting up the summarization pipeline.
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
# Example usage:
|
| 59 |
+
# handler = EndpointHandler()
|
| 60 |
# handler.load_model("path_to_your_model_directory")
|
| 61 |
# result = handler(json.dumps({"text": "Your input text here"}))
|
| 62 |
# print(result)
|