JHyeon commited on
Commit
867d3b4
โ€ข
1 Parent(s): 667a7c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -33
app.py CHANGED
@@ -1,40 +1,21 @@
1
- # import gradio as gr
2
-
3
- # def play_video():
4
- # return "KakaoTalk_20240412_132624096.mp4"
5
-
6
- # css = """
7
- # video {
8
- # width: 100% !important;
9
- # height: auto !important;
10
- # }
11
- # """
12
-
13
- # app = gr.Interface(
14
- # fn=play_video,
15
- # inputs=[],
16
- # outputs=gr.components.Video(label="Playback"),
17
- # title="Obstacles Detection Demo",
18
- # css=css
19
- # )
20
-
21
- # if __name__ == "__main__":
22
- # app.launch()
23
-
24
  import gradio as gr
25
 
26
- # ๋น„๋””์˜ค ํŒŒ์ผ์˜ ๊ฒฝ๋กœ๋“ค์„ ๋ฏธ๋ฆฌ ์ •์˜
27
- video_files = [
28
- "Movie005.mp4",
29
- "KakaoTalk_20240412_132624096.mp4"
30
- ]
 
 
 
 
31
 
32
  app = gr.Interface(
33
- fn=lambda x: x, # ์ž…๋ ฅ๋œ ๋น„๋””์˜ค๋ฅผ ๊ทธ๋Œ€๋กœ ๋ฐ˜ํ™˜
34
- inputs=gr.components.Video(label="Select Video"),
35
- outputs=gr.components.Video(label="Playback"), # ์ถœ๋ ฅ ์ปดํฌ๋„ŒํŠธ๋Š” ์„ค์ •ํ•˜์ง€๋งŒ ์‚ฌ์šฉํ•˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Œ
36
- title="Video Player Demo",
37
- examples=[[video] for video in video_files] # ๋น„๋””์˜ค ํŒŒ์ผ ์˜ˆ์‹œ๋ฅผ ๋ฆฌ์ŠคํŠธ์˜ ๋ฆฌ์ŠคํŠธ๋กœ ์ œ๊ณต
38
  )
39
 
40
  if __name__ == "__main__":
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ def play_video():
4
+ return "KakaoTalk_20240412_132624096.mp4"
5
+
6
+ css = """
7
+ video {
8
+ width: 100% !important;
9
+ height: auto !important;
10
+ }
11
+ """
12
 
13
  app = gr.Interface(
14
+ fn=play_video,
15
+ inputs=[],
16
+ outputs=gr.components.Video(label="Playback"),
17
+ title="Obstacles Detection Demo",
18
+ css=css
19
  )
20
 
21
  if __name__ == "__main__":