bhavyagiri commited on
Commit
3fa0323
1 Parent(s): 3d9e5c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -49,23 +49,24 @@ with gr.Blocks() as demo:
49
  """)
50
  with gr.Column():
51
  with gr.Row():
52
- in_yt = gr.Textbox(lines=1, placeholder="Enter Youtube URL", label="YouTube URL")
53
  with gr.Row():
54
  transcribe_btn = gr.Button("Trascribe")
55
  with gr.Column():
56
  with gr.Row():
57
- out_yt_html = "html"
58
  with gr.Row():
59
- out_yt_text = "text"
60
  with gr.Column():
61
  with gr.Row():
62
  in_query = gr.Textbox(lines=1, placeholder="What's your Question", label="Query")
63
  with gr.Row():
64
  ans_btn = gr.Button("Answer")
65
  with gr.Row():
66
- out_query = ["text"]
67
 
68
- ans_btn.click(fn=get_answer, inputs=[in_query,out_yt_text], outputs=out_query)
69
  transcribe_btn.click(fn=yt_transcribe, inputs=in_yt, outputs=[out_yt_html,out_yt_text])
 
70
 
71
  demo.launch()
 
49
  """)
50
  with gr.Column():
51
  with gr.Row():
52
+ in_yt = gr.inputs.Textbox(lines=1, placeholder="Enter Youtube URL", label="YouTube URL")
53
  with gr.Row():
54
  transcribe_btn = gr.Button("Trascribe")
55
  with gr.Column():
56
  with gr.Row():
57
+ out_yt_html = gradio.outputs.HTML()
58
  with gr.Row():
59
+ out_yt_text = gradio.Textbox()
60
  with gr.Column():
61
  with gr.Row():
62
  in_query = gr.Textbox(lines=1, placeholder="What's your Question", label="Query")
63
  with gr.Row():
64
  ans_btn = gr.Button("Answer")
65
  with gr.Row():
66
+ out_query = gradio.outputs.Textbox()
67
 
68
+
69
  transcribe_btn.click(fn=yt_transcribe, inputs=in_yt, outputs=[out_yt_html,out_yt_text])
70
+ ans_btn.click(fn=get_answer, inputs=[in_query,out_yt_text], outputs=out_query)
71
 
72
  demo.launch()