Spaces:
Runtime error
Runtime error
Updated path handling.
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import pathlib
|
|
| 6 |
|
| 7 |
posix_backup = pathlib.PosixPath
|
| 8 |
try:
|
| 9 |
-
pathlib.
|
| 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 =
|
|
|
|
| 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
|