How to deploy a PyTorch model in huggingface?

I created a PyTorch model for image recognition, i want to give it a button to upload image to the model .:-this is the code i used to upload image to recognise.:-import torchvision
import matplotlib.pyplot as plt
from typing import Dict,List

def plot_pred_image(model:torch.nn.Module,
image_path:str,
class_names:List[str]=None,
transform=None,
device:torch.device=None):
target_image = torchvision.io.read_image(str(image_path)).type(torch.float32)
target_image = target_image/255

if transform:
target_image = transform(target_image)

model.to(device)
model.eval()
with torch.inference_mode():
  target_image = target_image.unsqueeze(0)
  target_image_pred = model(target_image.to(device))
target_image_pred_probs = torch.softmax(target_image_pred,dim=1)
target_image_pred_label = torch.argmax(target_image_pred_probs,dim=1)
plt.imshow(target_image.squeeze().permute(1,2,0))
if class_names:
           title = f"Pred: {class_names[target_image_pred_label.cpu()]} | Prob {target_image_pred_probs.max():.2f}"
else:
           title = f"{target_image_pred_label} | Prob {target_image_pred_probs,max():3f}"
plt.title(title)
plt.axis(False)

plot_pred_image(model=model,
image_path=custom_image_path,
class_names=class_list,
transform=image_transform,
device=device) how to change this to button and upload image to the trained model?