Spaces:
Sleeping
Sleeping
{% extends 'base.html' %} | |
{% block content %} | |
<div class="container"> | |
<div class="row justify-content-center"> | |
<!-- Left Pane --> | |
<div class="col-md-5"> | |
<div class="card"> | |
<div class="card-body"> | |
<h5 class="card-title">Document AI</h5> | |
<p class="card-text">Enter a query and get an answer based on the stored context.</p> | |
<form method="POST" action="{{ url_for('chat') }}"> | |
<div class="form-group"> | |
<input type="text" name="query_text" placeholder="Enter your query" value="{{ query_text }}" | |
required class="form-control"> | |
</div> | |
<div class="form-group mt-2"> | |
<button type="submit" class="btn btn-primary">Submit</button> | |
</div> | |
</form> | |
{% if answer %} | |
<div class="answer-section mt-3"> | |
<h6>Answer:</h6> | |
<div class="answer">{{ answer }}</div> | |
</div> | |
{% endif %} | |
</div> | |
</div> | |
</div> | |
<!-- Right Pane --> | |
<div class="col-md-5"> | |
<div class="card"> | |
<div class="card-body"> | |
<h5 class="card-title">Previous Queries</h5> | |
<div class="history-section"> | |
{% for question, answer in history %} | |
<div class="card mb-3"> | |
<div class="card-body"> | |
<div class="question"> | |
<strong>Query:</strong> {{ question }} | |
</div> | |
<strong><hr></strong> | |
<div class="answer mt-2"> | |
<strong>Answer:</strong> {{ answer }} | |
</div> | |
</div> | |
</div> | |
<!-- {% if not loop.last %} | |
<hr> | |
{% endif %} --> | |
{% endfor %} | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
{% endblock %} |