Spaces:
Runtime error
Runtime error
Commit ·
106269c
1
Parent(s): fcf420f
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,19 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import os
|
| 3 |
import numpy as np
|
| 4 |
import re
|
|
@@ -15,7 +30,7 @@ def video_identity(video):
|
|
| 15 |
|
| 16 |
demo = gr.Interface(video_identity,
|
| 17 |
gr.Video(),
|
| 18 |
-
"playable_video"
|
| 19 |
#examples=[
|
| 20 |
# os.path.join(os.path.dirname(__file__),
|
| 21 |
# "video/video_sample.mp4")],
|
|
@@ -23,3 +38,4 @@ demo = gr.Interface(video_identity,
|
|
| 23 |
|
| 24 |
if __name__ == "__main__":
|
| 25 |
demo.launch()
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import numpy as np
|
| 3 |
+
|
| 4 |
+
def flip(im):
|
| 5 |
+
return np.flipud(im)
|
| 6 |
+
|
| 7 |
+
demo = gr.Interface(
|
| 8 |
+
flip,
|
| 9 |
+
gr.Image(sources=["webcam"], streaming=True),
|
| 10 |
+
"image",
|
| 11 |
+
live=True
|
| 12 |
+
)
|
| 13 |
+
demo.launch()
|
| 14 |
+
|
| 15 |
+
'''
|
| 16 |
+
import gradio as gr
|
| 17 |
import os
|
| 18 |
import numpy as np
|
| 19 |
import re
|
|
|
|
| 30 |
|
| 31 |
demo = gr.Interface(video_identity,
|
| 32 |
gr.Video(),
|
| 33 |
+
"playable_video"
|
| 34 |
#examples=[
|
| 35 |
# os.path.join(os.path.dirname(__file__),
|
| 36 |
# "video/video_sample.mp4")],
|
|
|
|
| 38 |
|
| 39 |
if __name__ == "__main__":
|
| 40 |
demo.launch()
|
| 41 |
+
'''
|