Skip to content

Commit

Permalink
Minor: removed double imports (weird that my linter did not complain)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsteude committed Oct 5, 2023
1 parent 70bdd0c commit a566843
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions images/llama2-chat-predictor/llama2_chat/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
InferResponse,
)

import os
import json
import transformers
from typing import Union, Dict
from kserve import Model, InferRequest, InferResponse
from transformers import AutoTokenizer


class Llama2ChatPredictor(Model):
def __init__(
Expand Down Expand Up @@ -61,11 +54,10 @@ def load(self):
device=self.device,
)


def preprocess(
self,
payload: Union[bytes, InferRequest],
headers: Dict[str, str] = None,
headers: Dict[str, str] = None,
) -> Dict:
"""
Preprocess the payload into the format expected by the predict method.
Expand All @@ -79,7 +71,6 @@ def preprocess(
"""
return payload if type(payload) == dict else json.loads(payload)


def predict(
self,
payload: Dict,
Expand Down

0 comments on commit a566843

Please sign in to comment.