Rebolforces commited on
Commit
690886e
1 Parent(s): f6952ca

init commit

Browse files
Files changed (7) hide show
  1. app.py +11 -0
  2. matsumoto.jpg +0 -0
  3. nagoya.jpg +0 -0
  4. okayama.jpg +0 -0
  5. osaka.jpg +0 -0
  6. requirements.txt +2 -0
  7. shimabara.jpg +0 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastai.vision.all import *
3
+ import skimage
4
+
5
+ learn = load_learner('export-castles.pkl')
6
+
7
+ labels = learn.dls.vocab
8
+ def predict(img):
9
+ img = PILImage.create(img)
10
+ pred,pred_idx,probs = learn.predict(img)
11
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
matsumoto.jpg ADDED
nagoya.jpg ADDED
okayama.jpg ADDED
osaka.jpg ADDED
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastai
2
+ scikit-image
shimabara.jpg ADDED