Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=
|
|
|
|
| 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)
|