hdnh2006
commited on
Commit
•
643a3e1
1
Parent(s):
539ede7
handler should work now
Browse files- handler.py +6 -6
handler.py
CHANGED
@@ -84,12 +84,12 @@ class EndpointHandler:
|
|
84 |
logging.info(f"Extracted parameters: {parameters}")
|
85 |
|
86 |
# Perform the question answering using the model
|
87 |
-
|
88 |
|
89 |
# pass inputs with all kwargs in data
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
|
95 |
-
return
|
|
|
84 |
logging.info(f"Extracted parameters: {parameters}")
|
85 |
|
86 |
# Perform the question answering using the model
|
87 |
+
# prediction = self.pipeline(inputs)
|
88 |
|
89 |
# pass inputs with all kwargs in data
|
90 |
+
if parameters is not None:
|
91 |
+
prediction = self.pipeline(inputs, **parameters)
|
92 |
+
else:
|
93 |
+
prediction = self.pipeline(inputs)
|
94 |
|
95 |
+
return prediction
|