Skip to content

Commit

Permalink
fix: mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-push committed Nov 1, 2023
1 parent 7fc9c6b commit c1f5eac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/chatbot/model.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from typing import Optional

import torch
from torch import Tensor
from transformers import AutoModelForCausalLM, AutoTokenizer


class DialoGPTChatbot:
def __init__(self) -> None:
self.tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-small")
self.model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-small")
self.chat_history_ids: Optional[torch.Tensor] = None
self.chat_history_ids: Optional[Tensor] = None

def get_response(self, user_input: str) -> str:
new_user_input_ids = self.tokenizer.encode(
Expand Down

0 comments on commit c1f5eac

Please sign in to comment.