Spaces:
Build error
Build error
Ubuntu
commited on
Commit
·
f8182db
1
Parent(s):
fe64c1e
video
Browse files- .ipynb_checkpoints/app-checkpoint.py +14 -0
- app.py +11 -4
.ipynb_checkpoints/app-checkpoint.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
def video_identity(video):
|
| 6 |
+
return video
|
| 7 |
+
demo = gr.Interface(video_identity,
|
| 8 |
+
gr.Video(),
|
| 9 |
+
"playable_video",
|
| 10 |
+
examples=[
|
| 11 |
+
os.path.join(os.path.dirname(__file__),
|
| 12 |
+
"video/video_sample.mp4")],
|
| 13 |
+
cache_examples=True)
|
| 14 |
+
demo.launch()
|
app.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def greet(name):
|
| 4 |
-
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
|
| 5 |
+
def video_identity(video):
|
| 6 |
+
return video
|
| 7 |
+
demo = gr.Interface(video_identity,
|
| 8 |
+
gr.Video(),
|
| 9 |
+
"playable_video",
|
| 10 |
+
examples=[
|
| 11 |
+
os.path.join(os.path.dirname(__file__),
|
| 12 |
+
"video/video_sample.mp4")],
|
| 13 |
+
cache_examples=True)
|
| 14 |
+
demo.launch()
|