Add type annotation to Model.get()
This commit is contained in:
parent
e4eb322aa7
commit
8d42a92848
|
@ -62,7 +62,7 @@ class Model:
|
||||||
}
|
}
|
||||||
return probs
|
return probs
|
||||||
|
|
||||||
def get(self, token):
|
def get(self, token: str) -> Dict[str, float]:
|
||||||
try:
|
try:
|
||||||
weights = self.weights[
|
weights = self.weights[
|
||||||
gptc.tokenizer.hash_single(gptc.tokenizer.normalize(token))
|
gptc.tokenizer.hash_single(gptc.tokenizer.normalize(token))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user