ericxlima commited on
Commit
ce7b541
·
1 Parent(s): 9f164f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,5 +1,7 @@
1
  import gradio as gr
2
- from transformers import pipeline
 
 
3
 
4
  dogs = {
5
  'Zwergspitz Dog': [],
@@ -18,7 +20,8 @@ dogs = {
18
  'Golden Retriever': [],
19
  }
20
 
21
- pipeline = pipeline(model="ericxlima/DogsClassifierModel")
 
22
 
23
  def predict(image):
24
  predictions = pipeline(image)
 
1
  import gradio as gr
2
+ from transformers import pipeline, AutoModel
3
+
4
+ model = AutoModel.from_pretrained("ericxlima/DogsClassifierModel")
5
 
6
  dogs = {
7
  'Zwergspitz Dog': [],
 
20
  'Golden Retriever': [],
21
  }
22
 
23
+ pipeline = pipeline("image-classification", model=model)
24
+
25
 
26
  def predict(image):
27
  predictions = pipeline(image)