jdmartinev commited on
Commit
cc82272
·
verified ·
1 Parent(s): 669274a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -6,7 +6,7 @@ from fastai.vision.core import PILImage
6
  from huggingface_hub import hf_hub_download
7
 
8
 
9
- learner = load_learner(hf_hub_download("jdmartinev/intel_image_classification_fastai","model.pkl"))
10
 
11
  def classify_image(image):
12
  img = PILImage.create(image)
@@ -14,7 +14,11 @@ def classify_image(image):
14
  return(f"Predicted class: {pred_class}")
15
 
16
  demo = gr.Interface(classify_image, gr.Image(shape=(224, 224)), "text")
17
- demo.launch()
 
 
 
 
18
 
19
 
20
 
 
6
  from huggingface_hub import hf_hub_download
7
 
8
 
9
+ learner = load_learner(hf_hub_download("jdmartinev/isitabird","model.pkl"))
10
 
11
  def classify_image(image):
12
  img = PILImage.create(image)
 
14
  return(f"Predicted class: {pred_class}")
15
 
16
  demo = gr.Interface(classify_image, gr.Image(shape=(224, 224)), "text")
17
+
18
+ gr.Interface(fn=classify_image,
19
+ inputs=gr.Image(width=224, height=224),
20
+ outputs="textbox").launch()
21
+
22
 
23
 
24