grademe / templates /form.html
vverma
HTML form
07317d3
raw
history blame contribute delete
725 Bytes
<!DOCTYPE html>
<html>
<head>
<title>LaTeX Image Parser</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
</script>
</head>
<body>
<h1>Upload an Image</h1>
<form action="/" method="post" enctype="multipart/form-data">
<input type="file" name="file" accept="image/png,image/jpeg" required>
<button type="submit">Upload</button>
</form>
{% if result %}
<h2>Prediction:</h2>
<p>Raw LaTeX:</p>
<pre>{{ result }}</pre>
<p>Rendered LaTeX:</p>
<p>$$ {{ result }} $$</p>
{% endif %}
</body>
</html>