Spaces:
No application file
No application file
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>BM25 Search App</title> | |
<link rel="stylesheet" href="static\css\styles.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>BM25 Search App</h1> | |
<form action="/search" method="post"> | |
<label for="query">Enter your query:</label> | |
<input type="text" id="query" name="query"> | |
<input type="submit" value="Search"> | |
</form> | |
{% if error %} | |
<p>{{ error }}</p> | |
{% endif %} | |
{% if query %} | |
<h2>Results for "{{ query }}":</h2> | |
<div class="results"> | |
<p>BM25 scores: {{ doc_scores }}</p> | |
<h3>Top Documents:</h3> | |
<ul> | |
{% for doc in top_n_docs %} | |
<li>{{ doc }}</li> | |
{% endfor %} | |
</ul> | |
</div> | |
{% endif %} | |
</div> | |
</body> | |
</html> | |