edit handler
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -18,10 +18,10 @@ class EndpointHandler:
|
|
| 18 |
start = perf_counter()
|
| 19 |
prediction = self.pipeline(inputs)
|
| 20 |
end = perf_counter()
|
| 21 |
-
|
| 22 |
|
| 23 |
return {
|
| 24 |
"labels": prediction.labels,
|
| 25 |
"scores": prediction.scores,
|
| 26 |
-
"latency (secs.)":
|
| 27 |
}
|
|
|
|
| 18 |
start = perf_counter()
|
| 19 |
prediction = self.pipeline(inputs)
|
| 20 |
end = perf_counter()
|
| 21 |
+
latency = end - start
|
| 22 |
|
| 23 |
return {
|
| 24 |
"labels": prediction.labels,
|
| 25 |
"scores": prediction.scores,
|
| 26 |
+
"latency (secs.)": latency
|
| 27 |
}
|