Spaces:
Sleeping
Sleeping
arithescientist
commited on
Commit
·
f5ab699
1
Parent(s):
55c0262
Update app.py
Browse files
app.py
CHANGED
@@ -55,10 +55,10 @@ def pdf_to_text(file_obj):
|
|
55 |
pdf.output("legal.pdf")
|
56 |
|
57 |
|
58 |
-
myobj = gTTS(text=output_text, lang='en', slow=False)
|
59 |
-
myobj.save("legal.wav")
|
60 |
|
61 |
-
return
|
62 |
|
63 |
|
64 |
|
@@ -67,7 +67,7 @@ def pdf_to_text(file_obj):
|
|
67 |
# return path
|
68 |
#pageObject.extractText()
|
69 |
iface = gr.Interface(fn = pdf_to_text,
|
70 |
-
inputs = "file", outputs=["
|
71 |
|
72 |
if __name__ == "__main__":
|
73 |
iface.launch(share=True)
|
|
|
55 |
pdf.output("legal.pdf")
|
56 |
|
57 |
|
58 |
+
#myobj = gTTS(text=output_text, lang='en', slow=False)
|
59 |
+
#myobj.save("legal.wav")
|
60 |
|
61 |
+
return output_text, "legal.pdf"
|
62 |
|
63 |
|
64 |
|
|
|
67 |
# return path
|
68 |
#pageObject.extractText()
|
69 |
iface = gr.Interface(fn = pdf_to_text,
|
70 |
+
inputs = "file", outputs=["text", "file"] )
|
71 |
|
72 |
if __name__ == "__main__":
|
73 |
iface.launch(share=True)
|