Spaces:
Runtime error
Runtime error
Salman Naqvi
commited on
Commit
·
ac219f9
1
Parent(s):
b47b11f
Readded blog post link.
Browse files
app.ipynb
CHANGED
@@ -205,8 +205,9 @@
|
|
205 |
"title = 'Bear Classifier'\n",
|
206 |
"description = 'My first AI model that can tell you whether an image contains a grizzly bear, a black bear, or a teddy bear. This model was trained on the ' \\\n",
|
207 |
" 'ResNet18 architecture and used the fastai library.'\n",
|
208 |
-
"
|
209 |
-
"
|
|
|
210 |
],
|
211 |
"metadata": {
|
212 |
"collapsed": false
|
@@ -272,11 +273,9 @@
|
|
272 |
" examples=examples,\n",
|
273 |
" title=title,\n",
|
274 |
" description=description,\n",
|
275 |
-
"\n",
|
276 |
")\n",
|
277 |
"\n",
|
278 |
-
"# article=article\n",
|
279 |
-
"\n",
|
280 |
"interface.launch(inline=False, enable_queue=True)"
|
281 |
],
|
282 |
"metadata": {
|
@@ -294,7 +293,7 @@
|
|
294 |
},
|
295 |
{
|
296 |
"cell_type": "code",
|
297 |
-
"execution_count":
|
298 |
"outputs": [],
|
299 |
"source": [
|
300 |
"from nbdev.export import nb_export"
|
@@ -305,7 +304,7 @@
|
|
305 |
},
|
306 |
{
|
307 |
"cell_type": "code",
|
308 |
-
"execution_count":
|
309 |
"outputs": [],
|
310 |
"source": [
|
311 |
"nb_export('app.ipynb', '.')"
|
|
|
205 |
"title = 'Bear Classifier'\n",
|
206 |
"description = 'My first AI model that can tell you whether an image contains a grizzly bear, a black bear, or a teddy bear. This model was trained on the ' \\\n",
|
207 |
" 'ResNet18 architecture and used the fastai library.'\n",
|
208 |
+
"article = \"\"\"\n",
|
209 |
+
"<p style='text-align: center; font-size: 36px'><a href='https://forbo7.github.io/forblog/posts/2_bear_classifier_model.html'>Blog Post</a></p>\n",
|
210 |
+
"\"\"\""
|
211 |
],
|
212 |
"metadata": {
|
213 |
"collapsed": false
|
|
|
273 |
" examples=examples,\n",
|
274 |
" title=title,\n",
|
275 |
" description=description,\n",
|
276 |
+
" article=article\n",
|
277 |
")\n",
|
278 |
"\n",
|
|
|
|
|
279 |
"interface.launch(inline=False, enable_queue=True)"
|
280 |
],
|
281 |
"metadata": {
|
|
|
293 |
},
|
294 |
{
|
295 |
"cell_type": "code",
|
296 |
+
"execution_count": 1,
|
297 |
"outputs": [],
|
298 |
"source": [
|
299 |
"from nbdev.export import nb_export"
|
|
|
304 |
},
|
305 |
{
|
306 |
"cell_type": "code",
|
307 |
+
"execution_count": 2,
|
308 |
"outputs": [],
|
309 |
"source": [
|
310 |
"nb_export('app.ipynb', '.')"
|
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb.
|
2 |
|
3 |
# %% auto 0
|
4 |
-
__all__ = ['learner', 'cats', 'img', 'lbl', 'examples', 'title', 'description', 'interface', 'classify_img']
|
5 |
|
6 |
# %% app.ipynb 3
|
7 |
from fastai.vision.all import *
|
@@ -25,8 +25,9 @@ examples = [str(img_path) for img_path in Path('example_images/').rglob('*.jpg')
|
|
25 |
title = 'Bear Classifier'
|
26 |
description = 'My first AI model that can tell you whether an image contains a grizzly bear, a black bear, or a teddy bear. This model was trained on the ' \
|
27 |
'ResNet18 architecture and used the fastai library.'
|
28 |
-
|
29 |
-
|
|
|
30 |
|
31 |
# %% app.ipynb 15
|
32 |
interface = gr.Interface(
|
@@ -36,9 +37,7 @@ interface = gr.Interface(
|
|
36 |
examples=examples,
|
37 |
title=title,
|
38 |
description=description,
|
39 |
-
|
40 |
)
|
41 |
|
42 |
-
# article=article
|
43 |
-
|
44 |
interface.launch(inline=False, enable_queue=True)
|
|
|
1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb.
|
2 |
|
3 |
# %% auto 0
|
4 |
+
__all__ = ['learner', 'cats', 'img', 'lbl', 'examples', 'title', 'description', 'article', 'interface', 'classify_img']
|
5 |
|
6 |
# %% app.ipynb 3
|
7 |
from fastai.vision.all import *
|
|
|
25 |
title = 'Bear Classifier'
|
26 |
description = 'My first AI model that can tell you whether an image contains a grizzly bear, a black bear, or a teddy bear. This model was trained on the ' \
|
27 |
'ResNet18 architecture and used the fastai library.'
|
28 |
+
article = """
|
29 |
+
<p style='text-align: center; font-size: 36px'><a href='https://forbo7.github.io/forblog/posts/2_bear_classifier_model.html'>Blog Post</a></p>
|
30 |
+
"""
|
31 |
|
32 |
# %% app.ipynb 15
|
33 |
interface = gr.Interface(
|
|
|
37 |
examples=examples,
|
38 |
title=title,
|
39 |
description=description,
|
40 |
+
article=article
|
41 |
)
|
42 |
|
|
|
|
|
43 |
interface.launch(inline=False, enable_queue=True)
|