Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
| 4 |
class EndpointHandler:
|
| 5 |
def __init__(self, path=""):
|
| 6 |
# 初始化对话生成管道
|
| 7 |
-
self.pipeline = pipeline("text-generation", model=path)
|
| 8 |
|
| 9 |
def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
| 10 |
"""
|
|
|
|
| 4 |
class EndpointHandler:
|
| 5 |
def __init__(self, path=""):
|
| 6 |
# 初始化对话生成管道
|
| 7 |
+
self.pipeline = pipeline("text-generation", model=path, device=0)
|
| 8 |
|
| 9 |
def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
| 10 |
"""
|