Spaces:
Runtime error
Runtime error
autonomous019
commited on
Commit
•
3decb3e
1
Parent(s):
c47a41a
took out examples from ui
Browse files
app.py
CHANGED
@@ -23,9 +23,6 @@ feature_extractor = ViTFeatureExtractor()
|
|
23 |
|
24 |
image = "cats.jpg"
|
25 |
|
26 |
-
|
27 |
-
torch.hub.download_url_to_file('http://images.cocodataset.org/val2017/000000039769.jpg', 'cats.jpg')
|
28 |
-
torch.hub.download_url_to_file('https://storage.googleapis.com/perceiver_io/dalmation.jpg', 'dog.jpg')
|
29 |
|
30 |
feature_extractor = PerceiverFeatureExtractor.from_pretrained("deepmind/vision-perceiver-conv")
|
31 |
model = PerceiverForImageClassificationConvProcessing.from_pretrained("deepmind/vision-perceiver-conv")
|
@@ -49,7 +46,7 @@ title = "Interactive demo: Perceiver for image classification"
|
|
49 |
description = "Demo for classifying images with Perceiver IO. To use it, simply upload an image or use the example images below and click 'submit' to let the model predict the 5 most probable ImageNet classes. Results will show up in a few seconds."
|
50 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2107.14795'>Perceiver IO: A General Architecture for Structured Inputs & Outputs</a> | <a href='https://deepmind.com/blog/article/building-architectures-that-can-handle-the-worlds-data/'>Official blog</a></p>"
|
51 |
|
52 |
-
gr.Interface(fn=classify_image, inputs=image, outputs=label, title=title, description=description, examples=
|
53 |
|
54 |
|
55 |
|
|
|
23 |
|
24 |
image = "cats.jpg"
|
25 |
|
|
|
|
|
|
|
26 |
|
27 |
feature_extractor = PerceiverFeatureExtractor.from_pretrained("deepmind/vision-perceiver-conv")
|
28 |
model = PerceiverForImageClassificationConvProcessing.from_pretrained("deepmind/vision-perceiver-conv")
|
|
|
46 |
description = "Demo for classifying images with Perceiver IO. To use it, simply upload an image or use the example images below and click 'submit' to let the model predict the 5 most probable ImageNet classes. Results will show up in a few seconds."
|
47 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2107.14795'>Perceiver IO: A General Architecture for Structured Inputs & Outputs</a> | <a href='https://deepmind.com/blog/article/building-architectures-that-can-handle-the-worlds-data/'>Official blog</a></p>"
|
48 |
|
49 |
+
gr.Interface(fn=classify_image, inputs=image, outputs=label, title=title, description=description, examples="", enable_queue=True).launch(debug=True)
|
50 |
|
51 |
|
52 |
|