Update handler.py
Browse files- handler.py +1 -3
handler.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
5 |
class EndpointHandler:
|
6 |
def __init__(self, path=""):
|
7 |
self.pipeline = pipeline(
|
8 |
-
"text-generation",
|
9 |
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
|
10 |
device_map='auto',
|
11 |
#trust_remote_code=True,
|
@@ -24,9 +24,7 @@ class EndpointHandler:
|
|
24 |
Return:
|
25 |
A :obj:`list` | `dict`: will be serialized and returned
|
26 |
"""
|
27 |
-
# get inputs
|
28 |
inputs = data.pop("inputs", "")
|
29 |
-
# get additional date field
|
30 |
params = data.pop("parameters", ())
|
31 |
if not params:
|
32 |
params = dict()
|
|
|
5 |
class EndpointHandler:
|
6 |
def __init__(self, path=""):
|
7 |
self.pipeline = pipeline(
|
8 |
+
task="text-generation",
|
9 |
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
|
10 |
device_map='auto',
|
11 |
#trust_remote_code=True,
|
|
|
24 |
Return:
|
25 |
A :obj:`list` | `dict`: will be serialized and returned
|
26 |
"""
|
|
|
27 |
inputs = data.pop("inputs", "")
|
|
|
28 |
params = data.pop("parameters", ())
|
29 |
if not params:
|
30 |
params = dict()
|