Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -96,9 +96,7 @@ def read_pdf_pr_en(pdf_file_path):
|
|
96 |
translator = GoogleTranslator(source='persian', target='english')
|
97 |
result = translator.translate(page_pdf)
|
98 |
full_text +=result
|
99 |
-
|
100 |
-
# نمایش محتوای کل فایل PDF
|
101 |
-
st.write(full_text)
|
102 |
return(full_text)
|
103 |
#################################################################################################################
|
104 |
def get_pdf_text(pdf_docs):
|
@@ -149,7 +147,8 @@ def main():
|
|
149 |
)
|
150 |
file_path = pdf_docs.name
|
151 |
st.write( file_path)
|
152 |
-
read_pdf_pr_en(pdf_file_path=file_path)
|
|
|
153 |
if st.button("Process"):
|
154 |
with st.spinner("Processing"):
|
155 |
st.write(pdf_docs)
|
|
|
96 |
translator = GoogleTranslator(source='persian', target='english')
|
97 |
result = translator.translate(page_pdf)
|
98 |
full_text +=result
|
99 |
+
st.write(full_text)
|
|
|
|
|
100 |
return(full_text)
|
101 |
#################################################################################################################
|
102 |
def get_pdf_text(pdf_docs):
|
|
|
147 |
)
|
148 |
file_path = pdf_docs.name
|
149 |
st.write( file_path)
|
150 |
+
full_text=read_pdf_pr_en(pdf_file_path=file_path)
|
151 |
+
|
152 |
if st.button("Process"):
|
153 |
with st.spinner("Processing"):
|
154 |
st.write(pdf_docs)
|