Mohammed Albrayh
commited on
Commit
•
4963a25
1
Parent(s):
bdaac53
edit py file
Browse files
app.py
CHANGED
@@ -2,11 +2,6 @@ import gradio as gr
|
|
2 |
import pickle
|
3 |
from fastai.vision.all import *
|
4 |
|
5 |
-
#Windows fix
|
6 |
-
import pathlib
|
7 |
-
temp = pathlib.PosixPath
|
8 |
-
pathlib.PosixPath = pathlib.WindowsPath
|
9 |
-
|
10 |
|
11 |
learn = load_learner('model.pkl')
|
12 |
|
@@ -18,5 +13,5 @@ def predict(input):
|
|
18 |
return results
|
19 |
|
20 |
|
21 |
-
demo = gr.Interface(fn=predict, inputs="image",examples=['examples
|
22 |
demo.launch()
|
|
|
2 |
import pickle
|
3 |
from fastai.vision.all import *
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
learn = load_learner('model.pkl')
|
7 |
|
|
|
13 |
return results
|
14 |
|
15 |
|
16 |
+
demo = gr.Interface(fn=predict, inputs="image",examples=['examples/Gun.jpg','examples/mario movie.jpg','examples/lalaLand.jpg'] ,outputs="text")
|
17 |
demo.launch()
|