Guillaume Ramelet commited on
Commit
7eafa82
1 Parent(s): 01dcb05

ajout d examples

Browse files
Files changed (4) hide show
  1. app.ipynb +9 -28
  2. app.py +2 -1
  3. cheese brie.jpg +3 -0
  4. cheese reblochon.webp +0 -0
app.ipynb CHANGED
@@ -158,7 +158,7 @@
158
  },
159
  {
160
  "cell_type": "code",
161
- "execution_count": 11,
162
  "id": "8f085556-cafc-4f00-8e63-d9028ab6bb41",
163
  "metadata": {},
164
  "outputs": [
@@ -180,7 +180,7 @@
180
  "name": "stdout",
181
  "output_type": "stream",
182
  "text": [
183
- "Running on local URL: http://127.0.0.1:7860\n",
184
  "\n",
185
  "To create a public link, set `share=True` in `launch()`.\n"
186
  ]
@@ -188,33 +188,13 @@
188
  {
189
  "data": {
190
  "text/plain": [
191
- "(<gradio.routes.App at 0x7f37f1a842e0>, 'http://127.0.0.1:7860/', None)"
192
  ]
193
  },
194
- "execution_count": 11,
195
  "metadata": {},
196
  "output_type": "execute_result"
197
  },
198
- {
199
- "data": {
200
- "text/html": [],
201
- "text/plain": [
202
- "<IPython.core.display.HTML object>"
203
- ]
204
- },
205
- "metadata": {},
206
- "output_type": "display_data"
207
- },
208
- {
209
- "data": {
210
- "text/html": [],
211
- "text/plain": [
212
- "<IPython.core.display.HTML object>"
213
- ]
214
- },
215
- "metadata": {},
216
- "output_type": "display_data"
217
- },
218
  {
219
  "data": {
220
  "text/html": [],
@@ -230,7 +210,8 @@
230
  "#|export\n",
231
  "image = gr.inputs.Image(shape=(192, 192))\n",
232
  "label = gr.outputs.Label()\n",
233
- "examples = ['cheese époisse.jpg', 'cheese camembert.jpg', 'cheese saint-nectaire.jpg']\n",
 
234
  "\n",
235
  "intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)\n",
236
  "intf.launch(inline=False)"
@@ -241,12 +222,12 @@
241
  "id": "9ba2ef1c-586c-40ea-9330-f49edd58aefa",
242
  "metadata": {},
243
  "source": [
244
- "## end -"
245
  ]
246
  },
247
  {
248
  "cell_type": "code",
249
- "execution_count": 13,
250
  "id": "0eb8bb14-208c-4fd5-bcd8-afef72993d7a",
251
  "metadata": {},
252
  "outputs": [],
@@ -257,7 +238,7 @@
257
  {
258
  "cell_type": "code",
259
  "execution_count": null,
260
- "id": "bd182dad-2551-4c24-8eb5-ed016b3e5e25",
261
  "metadata": {},
262
  "outputs": [],
263
  "source": []
 
158
  },
159
  {
160
  "cell_type": "code",
161
+ "execution_count": 16,
162
  "id": "8f085556-cafc-4f00-8e63-d9028ab6bb41",
163
  "metadata": {},
164
  "outputs": [
 
180
  "name": "stdout",
181
  "output_type": "stream",
182
  "text": [
183
+ "Running on local URL: http://127.0.0.1:7862\n",
184
  "\n",
185
  "To create a public link, set `share=True` in `launch()`.\n"
186
  ]
 
188
  {
189
  "data": {
190
  "text/plain": [
191
+ "(<gradio.routes.App at 0x7f37f1ee8d00>, 'http://127.0.0.1:7862/', None)"
192
  ]
193
  },
194
+ "execution_count": 16,
195
  "metadata": {},
196
  "output_type": "execute_result"
197
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  {
199
  "data": {
200
  "text/html": [],
 
210
  "#|export\n",
211
  "image = gr.inputs.Image(shape=(192, 192))\n",
212
  "label = gr.outputs.Label()\n",
213
+ "examples = ['cheese époisse.jpg', 'cheese camembert.jpg', 'cheese saint-nectaire.jpg', 'cheese raclette.jpg', \n",
214
+ " 'cheese roquefort.jpg', 'cheese brocciu.jpg', 'cheese comté.jpg', \"cheese mont d'or.jpg\", 'cheese reblochon.webp', 'cheese brie.jpg']\n",
215
  "\n",
216
  "intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)\n",
217
  "intf.launch(inline=False)"
 
222
  "id": "9ba2ef1c-586c-40ea-9330-f49edd58aefa",
223
  "metadata": {},
224
  "source": [
225
+ "## export"
226
  ]
227
  },
228
  {
229
  "cell_type": "code",
230
+ "execution_count": 17,
231
  "id": "0eb8bb14-208c-4fd5-bcd8-afef72993d7a",
232
  "metadata": {},
233
  "outputs": [],
 
238
  {
239
  "cell_type": "code",
240
  "execution_count": null,
241
+ "id": "04a8c5bf-3a06-404a-8f06-d12791d4c493",
242
  "metadata": {},
243
  "outputs": [],
244
  "source": []
app.py CHANGED
@@ -22,7 +22,8 @@ def classify_image(img):
22
  # %% app.ipynb 8
23
  image = gr.inputs.Image(shape=(192, 192))
24
  label = gr.outputs.Label()
25
- examples = ['cheese époisse.jpg', 'cheese camembert.jpg', 'cheese saint-nectaire.jpg']
 
26
 
27
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
28
  intf.launch(inline=False)
 
22
  # %% app.ipynb 8
23
  image = gr.inputs.Image(shape=(192, 192))
24
  label = gr.outputs.Label()
25
+ examples = ['cheese époisse.jpg', 'cheese camembert.jpg', 'cheese saint-nectaire.jpg', 'cheese raclette.jpg',
26
+ 'cheese roquefort.jpg', 'cheese brocciu.jpg', 'cheese comté.jpg', "cheese mont d'or.jpg", 'cheese reblochon.webp', 'cheese brie.jpg']
27
 
28
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
29
  intf.launch(inline=False)
cheese brie.jpg ADDED

Git LFS Details

  • SHA256: b3f0096fcbd186c9945fbabf4bfda73e7d0ea12d341361a6bf10892ac8bbf221
  • Pointer size: 132 Bytes
  • Size of remote file: 5 MB
cheese reblochon.webp ADDED