youngtsai commited on
Commit
28092cb
1 Parent(s): 4e80325

youtube_link_btn.click(

Browse files
Files changed (1) hide show
  1. app.py +22 -1
app.py CHANGED
@@ -829,7 +829,11 @@ with gr.Blocks(head=HEAD) as demo:
829
  with gr.Row():
830
  with gr.Column():
831
  file_upload = gr.File(label="Upload your CSV or Word file", visible=False)
832
- youtube_link = gr.Textbox(label="Enter YouTube Link")
 
 
 
 
833
  web_link = gr.Textbox(label="Enter Web Page Link", visible=False)
834
  chatbot = gr.Chatbot()
835
  socratic_mode_btn = gr.Checkbox(label="蘇格拉底家教助理模式", value=False)
@@ -896,6 +900,23 @@ with gr.Blocks(head=HEAD) as demo:
896
  slide_text
897
  ]
898
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
899
 
900
  # 当输入网页链接时触发
901
  web_link.change(process_web_link, inputs=web_link, outputs=[btn_1, btn_2, btn_3, df_summarise, df_string_output])
 
829
  with gr.Row():
830
  with gr.Column():
831
  file_upload = gr.File(label="Upload your CSV or Word file", visible=False)
832
+ with gr.Column():
833
+ with gr.Column():
834
+ youtube_link = gr.Textbox(label="Enter YouTube Link")
835
+ with gr.Column():
836
+ youtube_link_btn = gr.Button("Submit")
837
  web_link = gr.Textbox(label="Enter Web Page Link", visible=False)
838
  chatbot = gr.Chatbot()
839
  socratic_mode_btn = gr.Checkbox(label="蘇格拉底家教助理模式", value=False)
 
900
  slide_text
901
  ]
902
  )
903
+
904
+ youtube_link_btn.click(
905
+ process_youtube_link,
906
+ inputs=youtube_link,
907
+ outputs=[
908
+ btn_1,
909
+ btn_2,
910
+ btn_3,
911
+ df_string_output,
912
+ df_summarise,
913
+ mind_map,
914
+ mind_map_html,
915
+ transcript_html,
916
+ slide_image,
917
+ slide_text
918
+ ]
919
+ )
920
 
921
  # 当输入网页链接时触发
922
  web_link.change(process_web_link, inputs=web_link, outputs=[btn_1, btn_2, btn_3, df_summarise, df_string_output])