pablorodriper commited on
Commit
2a3f66a
1 Parent(s): 010636b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -2,15 +2,17 @@ import gradio as gr
2
  import tensorflow as tf
3
  from huggingface_hub import from_pretrained_keras
4
 
5
- description = "Keras implementation for Video Vision Transformer to classify samples of medmnist"
6
- 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>"
7
- title = "Video Vision Transformer on medmnist"
8
 
9
  def infer(x):
10
  return model.predict(tf.expand_dims(x, axis=0))[0]
11
 
12
  model = from_pretrained_keras("keras-io/video-vision-transformer")
13
 
 
 
14
  iface = gr.Interface(
15
  fn = infer,
16
  inputs = "video",
 
2
  import tensorflow as tf
3
  from huggingface_hub import from_pretrained_keras
4
 
5
+ description = "Keras implementation for Video Vision Transformer to classify samples of OrganMNIST3D\n\nModel train to classify CT videos"
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(x):
10
  return model.predict(tf.expand_dims(x, axis=0))[0]
11
 
12
  model = from_pretrained_keras("keras-io/video-vision-transformer")
13
 
14
+ labels = ['liver', 'kidney-right', 'kidney-left', 'femur-right', 'femur-left', 'bladder', 'heart', 'lung-right', 'lung-left', 'spleen', 'pancreas']
15
+
16
  iface = gr.Interface(
17
  fn = infer,
18
  inputs = "video",