-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
29 lines (23 loc) · 727 Bytes
/
app.py
File metadata and controls
29 lines (23 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from flask import Flask
from flask import request
from docx import Document
app = Flask(__name__)
@app.route('/')
def display():
return 'Hello World<>'
# @app.route('/api/summarize', methods=['POST'])
# def json_example():
# result_data = ""
# req_data = request.get_json()
# file_location = req_data['file']
# print(" FILE LOCATION : " + file_location)
# document = Document(file_location)
# for paragraph in document.paragraphs :
# for run in paragraph.runs:
# if run.bold:
# result_data = result_data + '\n' + paragraph.text
# break
# print(result_data)
# return result_data
if __name__ == '__main__':
app.run()