DebasishDhal99 commited on
Commit
6044ebd
1 Parent(s): b276a18

Trying tabbedinterface to join both the interfaces.

Browse files
Files changed (1) hide show
  1. app.py +21 -17
app.py CHANGED
@@ -35,29 +35,33 @@ interface1 = gr.Interface(
35
  theme="compact",
36
  )
37
 
38
- # second_heading = "YouTube Playlist Mismatch Calculator"
39
- # second_description = "Enter two YouTube playlist links (without quotation marks) to compare their contents and find the mismatch."
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='name')
44
  return f"Mismatch Result: {result}"
45
 
46
- # playlist_link_1_input = gr.inputs.Textbox(label="Playlist Link 1")
47
- # playlist_link_2_input = gr.inputs.Textbox(label="Playlist Link 2")
48
 
49
- # interface2 = gr.Interface(
50
- # fn=playlist_mismatch_calculator,
51
- # inputs=[playlist_link_1_input, playlist_link_2_input],
52
- # outputs=mismatch_outputs,
53
- # title=second_heading,
54
- # description=second_description,
55
- # examples=[
56
- # ["https://www.youtube.com/playlist?list=PL-osiE80TeTsWmV9i9c58mdDCSskIFdDS", "https://www.youtube.com/playlist?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p"],
57
- # ],
58
- # theme="compact",
59
- # )
60
 
61
 
62
- interface1.launch()
63
  # interface2.launch()
 
 
 
 
 
35
  theme="compact",
36
  )
37
 
38
+ second_heading = "YouTube Playlist Mismatch Calculator"
39
+ second_description = "Enter two YouTube playlist links (without quotation marks) to compare their contents and find the mismatch."
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='name')
44
  return f"Mismatch Result: {result}"
45
 
46
+ playlist_link_1_input = gr.inputs.Textbox(label="Playlist Link 1")
47
+ playlist_link_2_input = gr.inputs.Textbox(label="Playlist Link 2")
48
 
49
+ interface2 = gr.Interface(
50
+ fn=playlist_mismatch_calculator,
51
+ inputs=[playlist_link_1_input, playlist_link_2_input],
52
+ outputs=mismatch_outputs,
53
+ title=second_heading,
54
+ description=second_description,
55
+ examples=[
56
+ ["https://www.youtube.com/playlist?list=PL-osiE80TeTsWmV9i9c58mdDCSskIFdDS", "https://www.youtube.com/playlist?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p"],
57
+ ],
58
+ theme="compact",
59
+ )
60
 
61
 
62
+ # interface1.launch()
63
  # interface2.launch()
64
+
65
+ combinedinterface = gr.TabbedInterface([interface1,interface2],['Playlist Total and Average Duration', 'Playlist Mismatch'])
66
+
67
+ combinedinterface.launch()