gina9726 commited on
Commit
606f4f9
1 Parent(s): f358f59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -3,20 +3,20 @@ import gradio as gr
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
- def video_identity(video):
7
- return label
8
 
9
  examples = [
10
  "https://ak.picdn.net/shutterstock/videos/21179416/preview/stock-footage-aerial-shot-winter-forest.mp4",
11
  "https://ak.picdn.net/shutterstock/videos/5629184/preview/stock-footage-senior-couple-looking-through-binoculars-on-sailboat-together-shot-on-red-epic-for-high-quality-k.mp4",
12
  "https://ak.picdn.net/shutterstock/videos/1063125190/preview/stock-footage-a-beautiful-cookie-with-oranges-lies-on-a-green-tablecloth.mp4"
13
  ]
14
- iface = gr.Interface(video_identity,
15
- gr.Video(),
16
- "playable_video",
17
- examples=examples,
18
- labels=["test1","test2","test3"],
19
- cache_examples=True)
20
 
21
  #iface = gr.Interface(fn=greet, inputs="text", outputs="text")
22
  iface.launch()
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
+ #def video_identity(video):
7
+ # return hello
8
 
9
  examples = [
10
  "https://ak.picdn.net/shutterstock/videos/21179416/preview/stock-footage-aerial-shot-winter-forest.mp4",
11
  "https://ak.picdn.net/shutterstock/videos/5629184/preview/stock-footage-senior-couple-looking-through-binoculars-on-sailboat-together-shot-on-red-epic-for-high-quality-k.mp4",
12
  "https://ak.picdn.net/shutterstock/videos/1063125190/preview/stock-footage-a-beautiful-cookie-with-oranges-lies-on-a-green-tablecloth.mp4"
13
  ]
14
+ iface = gr.PlayableVideo(examples)
15
+ #iface = gr.Interface(video_identity,
16
+ # gr.Video(),
17
+ # "playable_video",
18
+ # examples=examples,
19
+ # cache_examples=True)
20
 
21
  #iface = gr.Interface(fn=greet, inputs="text", outputs="text")
22
  iface.launch()