gowtham58 commited on
Commit
a585d20
1 Parent(s): 2b069b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -4,9 +4,8 @@ plt = platform.system()
4
  if plt == 'Linux':
5
  pathlib.WindowsPath = pathlib.PosixPath
6
  from fastai.vision.all import *
7
- import torch
8
  import gradio as gr
9
- learn = torch.load('export.pkl', map_location=torch.device('cpu'))
10
 
11
  actors = learn.dls.vocab
12
  def classify_images(img):
 
4
  if plt == 'Linux':
5
  pathlib.WindowsPath = pathlib.PosixPath
6
  from fastai.vision.all import *
 
7
  import gradio as gr
8
+ learn = load_learner(Path('export.pkl'))
9
 
10
  actors = learn.dls.vocab
11
  def classify_images(img):