Spaces:
Build error
Build error
ValueError fix; reformat txt file input to stop blank tokens being passed to TTS engine
Browse files- app.py +1 -1
- src/file_readers.py +0 -1
app.py
CHANGED
@@ -41,7 +41,7 @@ if st.button('Click to run!'):
|
|
41 |
text, file_title = file_readers.read_epub(uploaded_file)
|
42 |
elif file_ext == 'text/plain':
|
43 |
file = uploaded_file.read()
|
44 |
-
text = file_readers.preprocess_text(file)
|
45 |
elif file_ext == 'application/pdf':
|
46 |
text = file_readers.read_pdf(uploaded_file)
|
47 |
else:
|
|
|
41 |
text, file_title = file_readers.read_epub(uploaded_file)
|
42 |
elif file_ext == 'text/plain':
|
43 |
file = uploaded_file.read()
|
44 |
+
text = [file_readers.preprocess_text(file)]
|
45 |
elif file_ext == 'application/pdf':
|
46 |
text = file_readers.read_pdf(uploaded_file)
|
47 |
else:
|
src/file_readers.py
CHANGED
@@ -128,7 +128,6 @@ def replace_symbols(text):
|
|
128 |
'=': ' equals ',
|
129 |
'β': ' approximately equal to ',
|
130 |
'*': ' times ',
|
131 |
-
'x': ' times ',
|
132 |
'%': ' percent ',
|
133 |
'/': ' divided by ',
|
134 |
'#': ' number ',
|
|
|
128 |
'=': ' equals ',
|
129 |
'β': ' approximately equal to ',
|
130 |
'*': ' times ',
|
|
|
131 |
'%': ' percent ',
|
132 |
'/': ' divided by ',
|
133 |
'#': ' number ',
|