broadfield commited on
Commit
08c3cd4
·
verified ·
1 Parent(s): 9213359

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -29,8 +29,8 @@ def read_pdf(pdf_url):
29
  for i in range(number_of_pages):
30
  page = reader.pages[i]
31
  txt_out+=page.extract_text()
32
- return txt_out
33
-
34
  def load_html(url):
35
  html=f"""<iframe src="https://docs.google.com/viewer?url={url.replace('http:','https:')})&embedded=true" frameborder="0" height="1200px" width="100%"></iframe></div>"""
36
  return html
@@ -50,5 +50,6 @@ with gr.Blocks() as app:
50
 
51
  app.load(None,None,t,js=js)
52
 
53
- t.change(read_pdf,t,bulk).then(load_html,t,h).then(pp.stream_tts,bulk,a)
 
54
  app.queue().launch(max_threads=40)
 
29
  for i in range(number_of_pages):
30
  page = reader.pages[i]
31
  txt_out+=page.extract_text()
32
+ #return txt_out
33
+ yield pp.stream_tts(txt_out)
34
  def load_html(url):
35
  html=f"""<iframe src="https://docs.google.com/viewer?url={url.replace('http:','https:')})&embedded=true" frameborder="0" height="1200px" width="100%"></iframe></div>"""
36
  return html
 
50
 
51
  app.load(None,None,t,js=js)
52
 
53
+ t.change(read_pdf,t,a)
54
+ #.then(load_html,t,h).then(pp.stream_tts,bulk,a)
55
  app.queue().launch(max_threads=40)