Samuel commited on
Commit ·
5770efe
1
Parent(s): 18e1c52
update
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ def index():
|
|
| 26 |
@app.route('/docs')
|
| 27 |
def docs():
|
| 28 |
"""API documentation"""
|
| 29 |
-
docs_html =
|
| 30 |
<!DOCTYPE html>
|
| 31 |
<html lang="en">
|
| 32 |
<head>
|
|
@@ -80,7 +80,7 @@ PDF file binary data</pre>
|
|
| 80 |
<h3 class="text-lg font-semibold mb-2">cURL - JSON Request:</h3>
|
| 81 |
<pre class="bg-gray-800 text-white p-4 rounded overflow-x-auto mb-4">curl -X POST http://localhost:7860/compile \\
|
| 82 |
-H "Content-Type: application/json" \\
|
| 83 |
-
-d '{"code": "\\\\documentclass{article}\\\\begin{document}Hello
|
| 84 |
--output output.pdf</pre>
|
| 85 |
|
| 86 |
<h3 class="text-lg font-semibold mb-2">cURL - File Upload:</h3>
|
|
@@ -126,7 +126,7 @@ else:
|
|
| 126 |
</div>
|
| 127 |
</body>
|
| 128 |
</html>
|
| 129 |
-
|
| 130 |
return docs_html
|
| 131 |
|
| 132 |
@app.route('/compile', methods=['POST'])
|
|
|
|
| 26 |
@app.route('/docs')
|
| 27 |
def docs():
|
| 28 |
"""API documentation"""
|
| 29 |
+
docs_html = '''
|
| 30 |
<!DOCTYPE html>
|
| 31 |
<html lang="en">
|
| 32 |
<head>
|
|
|
|
| 80 |
<h3 class="text-lg font-semibold mb-2">cURL - JSON Request:</h3>
|
| 81 |
<pre class="bg-gray-800 text-white p-4 rounded overflow-x-auto mb-4">curl -X POST http://localhost:7860/compile \\
|
| 82 |
-H "Content-Type: application/json" \\
|
| 83 |
+
-d '{"code": "\\\\documentclass{article}\\\\begin{document}Hello\\\\end{document}"}' \\
|
| 84 |
--output output.pdf</pre>
|
| 85 |
|
| 86 |
<h3 class="text-lg font-semibold mb-2">cURL - File Upload:</h3>
|
|
|
|
| 126 |
</div>
|
| 127 |
</body>
|
| 128 |
</html>
|
| 129 |
+
'''
|
| 130 |
return docs_html
|
| 131 |
|
| 132 |
@app.route('/compile', methods=['POST'])
|