Spaces:
Sleeping
Sleeping
Move index.html into templates/
Browse files- templates/index.html +29 -0
templates/index.html
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- templates/index.html -->
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
<html>
|
| 4 |
+
<head>
|
| 5 |
+
<title>Token Classification App</title>
|
| 6 |
+
</head>
|
| 7 |
+
<body>
|
| 8 |
+
<h1>Biomedical Token Tagger</h1>
|
| 9 |
+
<form method="POST">
|
| 10 |
+
<textarea name="search" rows="4" cols="50" placeholder="Enter your biomedical sentence here"></textarea><br>
|
| 11 |
+
<label for="pipeline_select">Select a model:</label>
|
| 12 |
+
<select name="pipeline_select">
|
| 13 |
+
{% for p in pipelines %}
|
| 14 |
+
<option value="{{ p.id }}">{{ p.name }}</option>
|
| 15 |
+
{% endfor %}
|
| 16 |
+
</select><br><br>
|
| 17 |
+
<button type="submit">Tag</button>
|
| 18 |
+
</form>
|
| 19 |
+
|
| 20 |
+
{% if results %}
|
| 21 |
+
<h2>Results (Model: {{ name }})</h2>
|
| 22 |
+
<ul>
|
| 23 |
+
{% for token, tag in results.items() %}
|
| 24 |
+
<li><strong>{{ token }}</strong>: {{ tag }}</li>
|
| 25 |
+
{% endfor %}
|
| 26 |
+
</ul>
|
| 27 |
+
{% endif %}
|
| 28 |
+
</body>
|
| 29 |
+
</html>
|