Spaces:
Running
Running
DebasishDhal99
commited on
Commit
•
f8706a3
1
Parent(s):
ceb9108
Giving option tor return video id, link or name
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ second_description = "Enter two YouTube playlist links (without quotation marks)
|
|
40 |
mismatch_outputs = gr.outputs.Textbox(label="Mismatch between two playlists")
|
41 |
|
42 |
def playlist_mismatch_calculator(playlist_link_1, playlist_link_2):
|
43 |
-
result = playlists_mismatch_func(playlist_link_1, playlist_link_2, output=
|
44 |
playlist1name = result[2]
|
45 |
playlist2name = result[3]
|
46 |
text = 'Present in {}, not in {} :- \n{} \n \nPresent in {}, not in {} :-\n {}'.format(result[2],result[3], result[0], result[3], result[2], result[1])
|
@@ -48,10 +48,11 @@ def playlist_mismatch_calculator(playlist_link_1, playlist_link_2):
|
|
48 |
|
49 |
playlist_link_1_input = gr.inputs.Textbox(label="Playlist Link 1")
|
50 |
playlist_link_2_input = gr.inputs.Textbox(label="Playlist Link 2")
|
|
|
51 |
|
52 |
interface2 = gr.Interface(
|
53 |
fn=playlist_mismatch_calculator,
|
54 |
-
inputs=[playlist_link_1_input, playlist_link_2_input],
|
55 |
outputs=mismatch_outputs,
|
56 |
title=second_heading,
|
57 |
description=second_description,
|
|
|
40 |
mismatch_outputs = gr.outputs.Textbox(label="Mismatch between two playlists")
|
41 |
|
42 |
def playlist_mismatch_calculator(playlist_link_1, playlist_link_2):
|
43 |
+
result = playlists_mismatch_func(playlist_link_1, playlist_link_2, output=output_options)
|
44 |
playlist1name = result[2]
|
45 |
playlist2name = result[3]
|
46 |
text = 'Present in {}, not in {} :- \n{} \n \nPresent in {}, not in {} :-\n {}'.format(result[2],result[3], result[0], result[3], result[2], result[1])
|
|
|
48 |
|
49 |
playlist_link_1_input = gr.inputs.Textbox(label="Playlist Link 1")
|
50 |
playlist_link_2_input = gr.inputs.Textbox(label="Playlist Link 2")
|
51 |
+
output_options = gr.inputs.Radio(["id", "link", "name"], label="Output Options")
|
52 |
|
53 |
interface2 = gr.Interface(
|
54 |
fn=playlist_mismatch_calculator,
|
55 |
+
inputs=[playlist_link_1_input, playlist_link_2_input, output_options],
|
56 |
outputs=mismatch_outputs,
|
57 |
title=second_heading,
|
58 |
description=second_description,
|