Spaces:
Runtime error
Runtime error
Josh
commited on
Commit
·
7244e49
1
Parent(s):
cbbb5c7
Add app and requirements
Browse files- app.py +12 -0
- requirements.txt +2 -0
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python3
|
2 |
+
import gradio as gr
|
3 |
+
from fastai.vision.all import *
|
4 |
+
import skimage
|
5 |
+
|
6 |
+
title = "Pet Breed Classifier"
|
7 |
+
description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces. Thank you to Tanishq Abraham for making this demo."
|
8 |
+
article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"
|
9 |
+
examples = ['../input/scratch-cat/scratch.jpg']
|
10 |
+
interpretation='default'
|
11 |
+
enable_queue=True
|
12 |
+
gr.Interface(fn=predict,inputs=gr.components.Image(shape=(512, 512)),outputs=gr.components.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation).launch(enable_queue=enable_queue,share=True)
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
fastai
|
2 |
+
scikit-image
|