TF-Keras
pablorodriper commited on
Commit
b899be8
·
1 Parent(s): 7a4e58b

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -24
app.py DELETED
@@ -1,24 +0,0 @@
1
- import gradio as gr
2
- import numpy as np
3
- import tensorflow as tf
4
- from huggingface_hub import from_pretrained_keras
5
-
6
- description = "Keras implementation for Video Vision Transformer to classify samples of medmnist"
7
- article = "Author:<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>"
8
- title = "Video Vision Transformer on medmnist"
9
-
10
- def infer(x):
11
- return model.predict(tf.expand_dims(x, axis=0))[0]
12
-
13
- model = from_pretrained_keras("keras-io/video-vision-transformer")
14
-
15
- iface = gr.Interface(
16
- fn = infer,
17
- inputs = "video",
18
- outputs = "number",
19
- description = description,
20
- title = title,
21
- article = article
22
- )
23
-
24
- iface.launch()