gianb commited on
Commit
b19be27
1 Parent(s): 38627fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,14 +41,14 @@ def summarize_and_speech(pdf_file):
41
  summary = summarization(abstract_text, max_length=15, min_length=10)[0]['summary_text']
42
 
43
  tts_output = synthesiser(summary)
44
- audio_data = tts_output[0]["audio"]
45
 
46
  return summary, audio_data
47
 
48
  iface = gr.Interface(
49
  fn=summarize_and_speech,
50
  inputs=gr.File(label="Upload PDF", type="binary"),
51
- outputs=[gr.Textbox(label="Abstract Summary:"), gr.Audio(type="filepath", label="Summary Speech")],
52
  live=True,
53
  title="Abstract Research Paper Summarizer",
54
  description="Upload a Research Paper PDF File. The model will generate a one line summary of the Abstract section and a speech audio."
 
41
  summary = summarization(abstract_text, max_length=15, min_length=10)[0]['summary_text']
42
 
43
  tts_output = synthesiser(summary)
44
+ audio_data = tts_output["audio"][0]
45
 
46
  return summary, audio_data
47
 
48
  iface = gr.Interface(
49
  fn=summarize_and_speech,
50
  inputs=gr.File(label="Upload PDF", type="binary"),
51
+ outputs=[gr.Textbox(label="Abstract Summary:"), gr.Audio(label="Summary Speech")],
52
  live=True,
53
  title="Abstract Research Paper Summarizer",
54
  description="Upload a Research Paper PDF File. The model will generate a one line summary of the Abstract section and a speech audio."