Brightttttt commited on
Commit
9694153
1 Parent(s): f01ec5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ classes=["Other","Anger","Contempt","Happiness","Surprise"]
14
  # load a resnet18 model pretrained on ImageNet
15
  # and turn off autograd on model's parameters
16
  def load_model(idx):
17
- model = torch.jit.load('/content/model_2_60acc.pt',map_location=torch.device('cpu')).eval()
18
  for param in model.parameters():
19
  param.requires_grad = False
20
  return model
@@ -68,7 +68,7 @@ def main():
68
  with gr.Box():
69
  input_image = gr.Image(type="pil", label="Input Image")
70
  example_images = gr.Dataset(components=[input_image],
71
- samples=[['/content/ogtest0.png'],['/content/ogtest1.png'],['/content/ogtest2.png'],['/content/ogtest3.png'],['/content/ogtest4.png'],['/content/ogtest5.png']]
72
  ,type="index")
73
 
74
  with gr.Row():
 
14
  # load a resnet18 model pretrained on ImageNet
15
  # and turn off autograd on model's parameters
16
  def load_model(idx):
17
+ model = torch.jit.load('model_2_60acc.pt',map_location=torch.device('cpu')).eval()
18
  for param in model.parameters():
19
  param.requires_grad = False
20
  return model
 
68
  with gr.Box():
69
  input_image = gr.Image(type="pil", label="Input Image")
70
  example_images = gr.Dataset(components=[input_image],
71
+ samples=[['ogtest0.png'],['ogtest1.png'],['ogtest2.png'],['ogtest3.png'],['ogtest4.png'],['ogtest5.png']]
72
  ,type="index")
73
 
74
  with gr.Row():