Spaces:
Runtime error
Runtime error
File size: 491 Bytes
42fa7ec f696919 6b63ef2 86ab458 42fa7ec 3110826 42fa7ec |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import torch
import os
import gradio as gr
from huggingface_hub import hf_hub_download
file_path = hf_hub_download("lfolle/DeepNAPSIModel", "dummy_model.pt",
use_auth_token=os.environ['DeepNAPSIModel'])
model = torch.load(file_path)
def predict(data):
return model(data)
iface = gr.Interface(
predict,
title="DeepNAPSI Application",
inputs=gr.Image(),
outputs=gr.Number(label="DeepNAPSI prediction"),
description=""
)
iface.launch()
|