arithescientist commited on
Commit
7956ef6
·
1 Parent(s): 19fe8c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,7 +4,6 @@ import numpy as np
4
  import os
5
  import re
6
  import tempfile
7
- import pdfkit
8
  from zipfile import ZipFile
9
  from gtts import gTTS
10
  from pdfminer.high_level import extract_text
@@ -25,13 +24,13 @@ def pdf_to_text(text, PDF):
25
  myobj = gTTS(text=output_text, lang='en', slow=False)
26
  myobj.save("audio.wav")
27
 
28
- return "audio.wav", output_text
29
 
30
 
31
  # return path
32
  #pageObject.extractText()
33
  iface = gr.Interface(fn = pdf_to_text,
34
- inputs =["text", "file"], outputs=["audio","text"] )
35
 
36
 
37
  if __name__ == "__main__":
 
4
  import os
5
  import re
6
  import tempfile
 
7
  from zipfile import ZipFile
8
  from gtts import gTTS
9
  from pdfminer.high_level import extract_text
 
24
  myobj = gTTS(text=output_text, lang='en', slow=False)
25
  myobj.save("audio.wav")
26
 
27
+ return "audio.wav"
28
 
29
 
30
  # return path
31
  #pageObject.extractText()
32
  iface = gr.Interface(fn = pdf_to_text,
33
+ inputs =["text", "file"], outputs=["audio"] )
34
 
35
 
36
  if __name__ == "__main__":