Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
pipe = pipeline(task="image-classification", model="rexoscare/string_instrument_detector")
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
gr.Interface.from_pipeline(pipe,
|
| 9 |
+
title="String Instrument Classification",
|
| 10 |
+
description="It will predict the Stringed Instrument",
|
| 11 |
+
examples = ["guitar.jpg", "uke.jpg",],
|
| 12 |
+
allow_flagging="never"
|
| 13 |
+
).launch(inbrowser=True)
|
| 14 |
+
|