Problem after installing new package

Hey, guys… I’m new to Docker and need your help. I’ve tried one chatbot application from this repo: medium/chatbot at main · andreRibeiro1989/medium · GitHub
and it works fine. However, after changing the model and its tokenizer which required the installation of new package I faced with the following error:
RuntimeError: probability tensor contains either inf, nan or element < 0
Can anybody explain me the problem, please?
All I did is just added asian-bart in Dockerfile. Here is the full error traceback:

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/", line 404, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/", line 78, in __call__
    return await, receive, send)
  File "/usr/local/lib/python3.8/site-packages/fastapi/", line 270, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/", line 124, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/", line 184, in __call__
    raise exc
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/", line 162, in __call__
    await, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/", line 75, in __call__
    raise exc
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/", line 64, in __call__
    await, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/fastapi/middleware/", line 21, in __call__
    raise e
  File "/usr/local/lib/python3.8/site-packages/fastapi/middleware/", line 18, in __call__
    await, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/", line 680, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/", line 275, in handle
    await, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/", line 65, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/site-packages/fastapi/", line 231, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.8/site-packages/fastapi/", line 160, in run_endpoint_function
    return await**values)
  File "", line 30, in root
    _ = chatbot.get_reply(message)
  File "/app/", line 36, in get_reply
    self.chat_history_ids = self.model.generate(
  File "/usr/local/lib/python3.8/site-packages/torch/autograd/", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/transformers/", line 1429, in generate
    return self.beam_sample(
  File "/usr/local/lib/python3.8/site-packages/transformers/", line 2593, in beam_sample
    next_tokens = torch.multinomial(probs, num_samples=2 * num_beams)
RuntimeError: probability tensor contains either `inf`, `nan` or element < 0

Since the error message indicates it is a problem with Tensorflow, can you first explain what that message means and why you think it is related to Docker? I could search for the message on Google, but if you know Tensorflow you can probably search better then I.

You can also ask the owner of the repository by opening an issue. If the problem is a wrong Dockerfile, the owner will more likely be able to help.