Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
pipeline = pipeline(task="image-classification", model="bortle/astrophotography-object-classifier-
|
5 |
|
6 |
def predict(image):
|
7 |
predictions = pipeline(image)
|
@@ -13,6 +13,6 @@ gr.Interface(
|
|
13 |
outputs=gr.Label(num_top_classes=5),
|
14 |
title="Astrophotography Object Classifier",
|
15 |
allow_flagging="manual",
|
16 |
-
examples=["examples/Andromeda.jpg", "examples/Heart.jpg", "examples/Pleiades.jpg", "examples/Rosette.jpg", "examples/GreatHercules.jpg", "examples/Leo-Triplet.jpg", "examples/Crab.jpg", "examples/North-America.jpg", "examples/Horsehead-Flame.jpg", "examples/Pinwheel.jpg"],
|
17 |
cache_examples=True
|
18 |
).launch()
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
pipeline = pipeline(task="image-classification", model="bortle/astrophotography-object-classifier-alpha2")
|
5 |
|
6 |
def predict(image):
|
7 |
predictions = pipeline(image)
|
|
|
13 |
outputs=gr.Label(num_top_classes=5),
|
14 |
title="Astrophotography Object Classifier",
|
15 |
allow_flagging="manual",
|
16 |
+
examples=["examples/Andromeda.jpg", "examples/Heart.jpg", "examples/Pleiades.jpg", "examples/Rosette.jpg", "examples/Moon.jpg", "examples/GreatHercules.jpg", "examples/Leo-Triplet.jpg", "examples/Crab.jpg", "examples/North-America.jpg", "examples/Horsehead-Flame.jpg", "examples/Pinwheel.jpg"],
|
17 |
cache_examples=True
|
18 |
).launch()
|