cmore
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
# In[1]:
|
13 |
|
14 |
|
15 |
-
get_ipython().system('pip install gradio')
|
16 |
|
17 |
|
18 |
# In[2]:
|
@@ -28,9 +28,6 @@ def is_cat(x): return x[0].isupper()
|
|
28 |
# In[3]:
|
29 |
|
30 |
|
31 |
-
im = PILImage.create('dog.jpg')
|
32 |
-
im.thumbnail((192,192))
|
33 |
-
im
|
34 |
|
35 |
|
36 |
# In[5]:
|
@@ -43,8 +40,6 @@ learn = load_learner('model.pkl')
|
|
43 |
# In[6]:
|
44 |
|
45 |
|
46 |
-
learn.predict(im)
|
47 |
-
|
48 |
|
49 |
# In[7]:
|
50 |
|
@@ -60,7 +55,6 @@ def classify_image(img):
|
|
60 |
# In[8]:
|
61 |
|
62 |
|
63 |
-
classify_image(im)
|
64 |
|
65 |
|
66 |
# In[10]:
|
@@ -78,19 +72,16 @@ intf.launch(inline=False)
|
|
78 |
# In[11]:
|
79 |
|
80 |
|
81 |
-
m = learn.model
|
82 |
|
83 |
|
84 |
# In[12]:
|
85 |
|
86 |
|
87 |
-
ps = list(m.parameters())
|
88 |
|
89 |
|
90 |
# In[13]:
|
91 |
|
92 |
|
93 |
-
ps[1]
|
94 |
|
95 |
|
96 |
# # Exporting
|
@@ -98,7 +89,6 @@ ps[1]
|
|
98 |
# In[15]:
|
99 |
|
100 |
|
101 |
-
get_ipython().system('pip install nbdev')
|
102 |
|
103 |
|
104 |
# In[ ]:
|
@@ -110,10 +100,6 @@ get_ipython().system('pip install nbdev')
|
|
110 |
# In[34]:
|
111 |
|
112 |
|
113 |
-
import nbdev
|
114 |
-
#nbdev.export.nb_export('Dogs v Cats.ipynb', 'app')
|
115 |
-
nbdev.export.nb_export('Dogs v Cats.ipynb', './')
|
116 |
-
print('Export successful')
|
117 |
|
118 |
|
119 |
# In[ ]:
|
|
|
12 |
# In[1]:
|
13 |
|
14 |
|
15 |
+
#get_ipython().system('pip install gradio')
|
16 |
|
17 |
|
18 |
# In[2]:
|
|
|
28 |
# In[3]:
|
29 |
|
30 |
|
|
|
|
|
|
|
31 |
|
32 |
|
33 |
# In[5]:
|
|
|
40 |
# In[6]:
|
41 |
|
42 |
|
|
|
|
|
43 |
|
44 |
# In[7]:
|
45 |
|
|
|
55 |
# In[8]:
|
56 |
|
57 |
|
|
|
58 |
|
59 |
|
60 |
# In[10]:
|
|
|
72 |
# In[11]:
|
73 |
|
74 |
|
|
|
75 |
|
76 |
|
77 |
# In[12]:
|
78 |
|
79 |
|
|
|
80 |
|
81 |
|
82 |
# In[13]:
|
83 |
|
84 |
|
|
|
85 |
|
86 |
|
87 |
# # Exporting
|
|
|
89 |
# In[15]:
|
90 |
|
91 |
|
|
|
92 |
|
93 |
|
94 |
# In[ ]:
|
|
|
100 |
# In[34]:
|
101 |
|
102 |
|
|
|
|
|
|
|
|
|
103 |
|
104 |
|
105 |
# In[ ]:
|