Spaces:
Build error
Build error
Commit
·
199b9a9
1
Parent(s):
b6f5ae8
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ description = "Keras implementation for Video Vision Transformer trained with Or
|
|
6 |
article = "Classes: liver, kidney-right, kidney-left, femur-right, femur-left, bladder, heart, lung-right, lung-left, spleen, pancreas.\n\nAuthor:<a href=\"https://huggingface.co/pablorodriper/\"> Pablo Rodríguez</a>; Based on the keras example by <a href=\"https://keras.io/examples/vision/vivit/\">Aritra Roy Gosthipaty and Ayush Thakur</a>"
|
7 |
title = "Video Vision Transformer on OrganMNIST3D"
|
8 |
|
9 |
-
def infer(
|
10 |
-
return model.predict(tf.expand_dims(
|
11 |
|
12 |
model = from_pretrained_keras("keras-io/video-vision-transformer")
|
13 |
|
@@ -19,7 +19,8 @@ iface = gr.Interface(
|
|
19 |
outputs = "number",
|
20 |
description = description,
|
21 |
title = title,
|
22 |
-
article = article
|
|
|
23 |
)
|
24 |
|
25 |
iface.launch()
|
|
|
6 |
article = "Classes: liver, kidney-right, kidney-left, femur-right, femur-left, bladder, heart, lung-right, lung-left, spleen, pancreas.\n\nAuthor:<a href=\"https://huggingface.co/pablorodriper/\"> Pablo Rodríguez</a>; Based on the keras example by <a href=\"https://keras.io/examples/vision/vivit/\">Aritra Roy Gosthipaty and Ayush Thakur</a>"
|
7 |
title = "Video Vision Transformer on OrganMNIST3D"
|
8 |
|
9 |
+
def infer(video):
|
10 |
+
return model.predict(tf.expand_dims(video, axis=0))[0]
|
11 |
|
12 |
model = from_pretrained_keras("keras-io/video-vision-transformer")
|
13 |
|
|
|
19 |
outputs = "number",
|
20 |
description = description,
|
21 |
title = title,
|
22 |
+
article = article,
|
23 |
+
examples=["example_1.mp4", "example_2.mp4"]
|
24 |
)
|
25 |
|
26 |
iface.launch()
|