Pablogps commited on
Commit
474a940
·
verified ·
1 Parent(s): 13a252e

Update app.py

Browse files

Removed debug code

Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -1,16 +1,11 @@
1
  import gradio as gr
2
  from fastai.vision.all import *
3
  from huggingface_hub import from_pretrained_fastai
4
- import os
5
 
6
 
7
  learn = from_pretrained_fastai("Pablogps/gradio-test-24")
8
  labels = learn.dls.vocab
9
 
10
- # Get the current file's directory and construct the image path
11
- current_dir = os.path.dirname(__file__)
12
- # example_image_path = os.path.join(current_dir, 'french.jpg')
13
- example_image_path = './french.jpg'
14
 
15
  def predict(img):
16
  img = PILImage.create(img)
@@ -20,8 +15,7 @@ def predict(img):
20
 
21
  title = "Bad castle predictor"
22
  description = "A bad model that tries to identify the type of castle."
23
- # examples = ['spanish.jpg', 'french.jpg', 'japanese.jpg']
24
- examples = [[example_image_path]]
25
 
26
  gr.Interface(
27
  fn=predict,
 
1
  import gradio as gr
2
  from fastai.vision.all import *
3
  from huggingface_hub import from_pretrained_fastai
 
4
 
5
 
6
  learn = from_pretrained_fastai("Pablogps/gradio-test-24")
7
  labels = learn.dls.vocab
8
 
 
 
 
 
9
 
10
  def predict(img):
11
  img = PILImage.create(img)
 
15
 
16
  title = "Bad castle predictor"
17
  description = "A bad model that tries to identify the type of castle."
18
+ examples = ['spanish.jpg', 'french.jpg', 'japanese.jpg']
 
19
 
20
  gr.Interface(
21
  fn=predict,