SteveDigital commited on
Commit
f3473b2
1 Parent(s): bccbce6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,7 +23,7 @@ def get_text(url):
23
 
24
  def get_summary(article):
25
  print(article)
26
- b = summarizer(article, min_length=20, max_length=30)
27
  print(b)
28
  b = b[0]['summary_text']
29
  return b
@@ -39,7 +39,7 @@ with gr.Blocks() as demo:
39
  result_button_summary = gr.Button('2. Create Summary')
40
  output_text_summary = gr.Textbox(placeholder='Summary of the YouTube video transcript.', label='Summary')
41
 
42
- result_button_transcribe.click(get_text, inputs = input_text_url, outputs = output_text_transcribe)
43
- result_button_summary.click(get_summary, inputs = output_text_transcribe, outputs = output_text_summary)
44
 
45
  demo.launch(debug = True)
 
23
 
24
  def get_summary(article):
25
  print(article)
26
+ b = summarizer(article, min_length=20, max_length=30, do_sample=False)
27
  print(b)
28
  b = b[0]['summary_text']
29
  return b
 
39
  result_button_summary = gr.Button('2. Create Summary')
40
  output_text_summary = gr.Textbox(placeholder='Summary of the YouTube video transcript.', label='Summary')
41
 
42
+ result_button_transcribe.click(get_text, inputs=input_text_url, outputs=output_text_transcribe)
43
+ result_button_summary.click(get_summary, inputs=output_text_transcribe, outputs=output_text_summary)
44
 
45
  demo.launch(debug = True)