prairie-guy commited on
Commit
c605cb7
1 Parent(s): 07dc94e

Deploy Art_Mood

Browse files
Files changed (11) hide show
  1. _Image10.jpg +3 -0
  2. _Image11.jpg +3 -0
  3. _Image12.jpg +3 -0
  4. _Image5.jpg +3 -0
  5. _Image6.jpg +3 -0
  6. _Image7.jpg +3 -0
  7. _Image8.jpg +3 -0
  8. _Image9.jpg +3 -0
  9. app.py +18 -0
  10. export.pkl +3 -0
  11. requirements.txt +2 -0
_Image10.jpg ADDED

Git LFS Details

  • SHA256: eb504310f5175a4a9dd35a82d6b2deb21f18943fced517cfdd9d523976686939
  • Pointer size: 130 Bytes
  • Size of remote file: 61.9 kB
_Image11.jpg ADDED

Git LFS Details

  • SHA256: d440cd3741b6ea51becd66d163d03ab59066ece7c80e094808757fcc1adfdcbf
  • Pointer size: 130 Bytes
  • Size of remote file: 54 kB
_Image12.jpg ADDED

Git LFS Details

  • SHA256: 153f8f4969db46673d0b8b9f698721b13e1c49d8cd251c4a822c60cde8092a16
  • Pointer size: 131 Bytes
  • Size of remote file: 102 kB
_Image5.jpg ADDED

Git LFS Details

  • SHA256: 921f230d50b5c28064858781122b83a4f490f374337f95eb5d3fc89ef999c201
  • Pointer size: 130 Bytes
  • Size of remote file: 89.2 kB
_Image6.jpg ADDED

Git LFS Details

  • SHA256: 7d486e73216ec1ded7ded367d8bb54507b1d816e9f9071774906ceb260a214df
  • Pointer size: 130 Bytes
  • Size of remote file: 53.2 kB
_Image7.jpg ADDED

Git LFS Details

  • SHA256: 74afa1b08321d07b87fb81d6334e14a71917b6a8b01390d5de1611d5b25f91d6
  • Pointer size: 130 Bytes
  • Size of remote file: 48 kB
_Image8.jpg ADDED

Git LFS Details

  • SHA256: 95b709fb0abfcd554e71b6d6bfd58502c29f2246eb30ee77b6b9a633360b0d2d
  • Pointer size: 131 Bytes
  • Size of remote file: 155 kB
_Image9.jpg ADDED

Git LFS Details

  • SHA256: 6b169347a69d02acbb9c0d76aa508cd272c76801656e41e28f6e528ee05fffc1
  • Pointer size: 130 Bytes
  • Size of remote file: 50 kB
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastai.vision.all import *
3
+ import skimage
4
+
5
+ learn = load_learner('export.pkl')
6
+
7
+ def predict(img):
8
+ labels = learn.dls.vocab
9
+ im = PILImage.create(img)
10
+ pred,pred_idx,probs = learn.predict(im)
11
+ return {label: float(prob) for (label,prob) in zip(labels,probs)}
12
+
13
+ gr.Interface(fn=predict,
14
+ inputs=gr.inputs.Image(shape=((400,400))),
15
+ outputs=gr.outputs.Label(num_top_classes=4),
16
+ title = "Art Mood",
17
+ examples = [f'_Image{i}.jpg' for i in range(5,12)],
18
+ description= "What is the Mood of the Art? Spring, Summer, Winter or Fall?").launch(share=True, enable_queue=True)
export.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:399c9a23aab84157a48c5468caec1bb1e9e574ab580c5bd8cccec375840e5cb4
3
+ size 102931549
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
1
+ fastai
2
+ scikit-image