lfolle commited on
Commit
efdf1b4
1 Parent(s): 8cf6d22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -2,13 +2,14 @@ import torch
2
  import os
3
 
4
  import gradio as gr
5
-
6
  from huggingface_hub import hf_hub_download
7
 
 
 
8
 
9
- file_path = hf_hub_download("lfolle/DeepNAPSIModel", "dummy_model.pt",
10
  use_auth_token=os.environ['DeepNAPSIModel'])
11
- model = torch.load(file_path)
12
 
13
  def predict(data):
14
  return model(data)
 
2
  import os
3
 
4
  import gradio as gr
 
5
  from huggingface_hub import hf_hub_download
6
 
7
+ from DummyModel import DummyModel
8
+
9
 
10
+ file_path = hf_hub_download("lfolle/DeepNAPSIModel", "dummy_model.pth",
11
  use_auth_token=os.environ['DeepNAPSIModel'])
12
+ model = DummyModel().load_state_dict(torch.load(file_path))
13
 
14
  def predict(data):
15
  return model(data)