arjunbhargav212 commited on
Commit
b3922ef
·
verified ·
1 Parent(s): 138926d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -5,9 +5,17 @@ from docling.document_converter import DocumentConverter
5
  app = Flask(__name__)
6
  converter = DocumentConverter()
7
 
8
- @app.route('/')
9
- def home():
10
- return {"status": "online", "message": "API is operational"}, 200
 
 
 
 
 
 
 
 
11
 
12
  @app.route('/process', methods=['POST'])
13
  def process_document():
 
5
  app = Flask(__name__)
6
  converter = DocumentConverter()
7
 
8
+ @app.route('/', methods=['GET'])
9
+ def index():
10
+ return render_template_string('''
11
+ <!doctype html>
12
+ <title>Docling Processor</title>
13
+ <h1>Upload PDF to Convert to Markdown</h1>
14
+ <form method="post" action="/process" enctype="multipart/form-data">
15
+ <input type="file" name="file">
16
+ <input type="submit" value="Convert">
17
+ </form>
18
+ ''')
19
 
20
  @app.route('/process', methods=['POST'])
21
  def process_document():