Mary12 commited on
Commit
d9c2c2b
·
1 Parent(s): 8786627

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -39,12 +39,17 @@ def extract_text_from_txt(file_path):
39
  # return text
40
 
41
  def extract_text_from_doc(file_path):
42
- text = ""
43
- doc = docx.Document(file_path)
44
- for texts in doc.paragraphs:
45
- text+= texts.text + "\n"
46
 
47
- return texts
 
 
 
 
 
48
 
49
 
50
 
 
39
  # return text
40
 
41
  def extract_text_from_doc(file_path):
42
+ # text = ""
43
+ # doc = docx.Document(file_path)
44
+ # for texts in doc.paragraphs:
45
+ # text+= texts.text + "\n"
46
 
47
+ # return texts
48
+ doc = docx.Document(file_path)
49
+ fullText = []
50
+ for para in doc.paragraphs:
51
+ fullText.append(para.text)
52
+ return '\n'.join(fullText)
53
 
54
 
55