sqdArtemy commited on
Commit
bbceb2b
·
1 Parent(s): 7d95d45

Updated path handling.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ import pathlib
6
 
7
  posix_backup = pathlib.PosixPath
8
  try:
9
- pathlib.PosixPath = pathlib.WindowsPath
10
  learn = load_learner(pathlib.Path('./model.pkl'))
11
  categories = ("Angry", "Sad", "Happy")
12
 
@@ -23,4 +23,4 @@ try:
23
  interface = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
24
  interface.launch(inline=False)
25
  finally:
26
- pathlib.PosixPath = posix_backup
 
6
 
7
  posix_backup = pathlib.PosixPath
8
  try:
9
+ pathlib.WindowsPath = pathlib.PosixPath
10
  learn = load_learner(pathlib.Path('./model.pkl'))
11
  categories = ("Angry", "Sad", "Happy")
12
 
 
23
  interface = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
24
  interface.launch(inline=False)
25
  finally:
26
+ pathlib.PosixPath = pathlib.WindowsPath