Spaces:
Runtime error
Runtime error
try a load
Browse files
app.py
CHANGED
|
@@ -1,7 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
iface = gr.Interface(fn=
|
| 7 |
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
"""
|
| 4 |
+
pipe = pipeline("classification", model="openai/clip-vit-large-patch14")
|
| 5 |
+
def classify(img):
|
| 6 |
+
predictions = pipe(img)
|
| 7 |
+
pipe(text=["", "a photo of a dog"], images=image, return_tensors="pt", padding=True)
|
| 8 |
+
return predictions
|
| 9 |
|
| 10 |
+
iface = gr.Interface(fn=classify, inputs="image", outputs="text")
|
| 11 |
iface.launch()
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
iface = gr.Interface.load("huggingface/gradio/clip-vit-large-patch14/")
|
| 16 |
+
iface.launch()
|