Spaces:
Running
Running
DebasishDhal99
commited on
Commit
•
10cbb02
1
Parent(s):
cf4944b
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from playlist_duration import playlist_duration_func
|
3 |
from average_duration import playlist_average_duration_func
|
|
|
4 |
|
5 |
def playlist_duration_calculator(playlist_link, calculation_type):
|
6 |
if calculation_type == "Total Duration":
|
@@ -28,4 +29,23 @@ gr.Interface(
|
|
28 |
["https://www.youtube.com/playlist?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p", "Average Duration"],
|
29 |
],
|
30 |
theme="compact",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
).launch()
|
|
|
1 |
import gradio as gr
|
2 |
from playlist_duration import playlist_duration_func
|
3 |
from average_duration import playlist_average_duration_func
|
4 |
+
from playlists_mismatch import playlists_mismatch_func
|
5 |
|
6 |
def playlist_duration_calculator(playlist_link, calculation_type):
|
7 |
if calculation_type == "Total Duration":
|
|
|
29 |
["https://www.youtube.com/playlist?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p", "Average Duration"],
|
30 |
],
|
31 |
theme="compact",
|
32 |
+
).launch()
|
33 |
+
|
34 |
+
second_heading = "YouTube Playlist Mismatch Calculator"
|
35 |
+
second_description = "Enter two YouTube playlist links to compare their contents and find the mismatch."
|
36 |
+
|
37 |
+
def playlist_mismatch_calculator(playlist_link_1, playlist_link_2):
|
38 |
+
result = playlist_mismatch_func(playlist_link_1, playlist_link_2)
|
39 |
+
return f"Mismatch Result: {result}"
|
40 |
+
|
41 |
+
gr.Interface(
|
42 |
+
fn=playlist_mismatch_calculator,
|
43 |
+
inputs=[playlist_link_1_input, playlist_link_2_input],
|
44 |
+
outputs=mismatch_outputs,
|
45 |
+
title=second_heading,
|
46 |
+
description=second_description,
|
47 |
+
examples=[
|
48 |
+
["https://www.youtube.com/playlist?list=PL-osiE80TeTsWmV9i9c58mdDCSskIFdDS", "https://www.youtube.com/playlist?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p"],
|
49 |
+
],
|
50 |
+
theme="compact",
|
51 |
).launch()
|