itsmariamaraki commited on
Commit
ca2c61a
β€’
1 Parent(s): 523e82e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,7 +42,7 @@ audiospeech = pipeline('text-to-speech', model = 'suno/bark-small') #the voice i
42
  def summarization_n_audiospeech(pdf_file):
43
  abstract_text = abstract(pdf_file)
44
 
45
- summary = summarization(abstract_text, max_length=50, min_length=10)[0]['summary_text'] #didn't know exactly what would give one sentence, so i changed multiple type the min & max lengths. for a dif article, those parameters would have to be different as well
46
 
47
  #converting the summarization into an audio output
48
  tts_output = audiospeech(summary)
@@ -65,7 +65,7 @@ iface = gr.Interface(
65
  ],
66
  title = "PDF's Abstract Summarization & Audio Speech Processor",
67
  description = "App that generates a one-line summary of the abstract & a speech audio of this summarization -- requirements: app only accepts PDFs which include an ABSTRACT section",
68
- examples = ['Efficient_Estimation_of_Word_Representations.pdf', 'Hidden_Technical_Debt.pdf']
69
  )
70
 
71
  iface.launch()
 
42
  def summarization_n_audiospeech(pdf_file):
43
  abstract_text = abstract(pdf_file)
44
 
45
+ summary = summarization(abstract_text, max_length=50, min_length=10)[0]['summary_text'] #didn't know exactly what would give one sentence, so i checked multiple times the min & max lengths regarding the 11th article. for a dif article, those parameters would probably have to be different as well
46
 
47
  #converting the summarization into an audio output
48
  tts_output = audiospeech(summary)
 
65
  ],
66
  title = "PDF's Abstract Summarization & Audio Speech Processor",
67
  description = "App that generates a one-line summary of the abstract & a speech audio of this summarization -- requirements: app only accepts PDFs which include an ABSTRACT section",
68
+ #examples = ['The_Future_of_AI_is_Hybrid.pdf', 'Efficient_Estimation_of_Word_Representations.pdf', 'Hidden_Technical_Debt.pdf']
69
  )
70
 
71
  iface.launch()