88 lines
2.7 KiB
HTML
Executable File
88 lines
2.7 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<title>Deep Image Search</title>
|
|
<link rel="icon" href="{{ url_for('static',filename='img/favicon.ico') }}" />
|
|
|
|
<script src= "{{ url_for('static',filename='js/ui.js') }}"></script>
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div>
|
|
<table>
|
|
<tr>
|
|
<td><a href="." title="Home"><img
|
|
src="{{ url_for('static',filename='img/aimh_logo.png') }}" border="0" align="bottom"
|
|
width="160"></a></td>
|
|
<td><img id="queryImage" src="{{session['query']}}" alt=""
|
|
width="80" align="middle"></td>
|
|
</table>
|
|
|
|
<table>
|
|
<tr>
|
|
<td colspan="3">
|
|
<div id="searchForm">
|
|
<span id="urlText" style="display: none;"><b>Paste image URL</b></span>
|
|
<a href="#" id="urlLink" onclick="changeQueryBySampleMod('url')" >Paste image URL</a>
|
|
<span id="uploadText"><b>Upload an image</b></span>
|
|
<a href="#" id="uploadLink" onclick="changeQueryBySampleMod('upload')" style="display: none;">Upload an image</a>
|
|
<form id="searchbar" method="POST" enctype="multipart/form-data" name="form1" action="./searchByImg">
|
|
<table cellspacing="1" cellpadding="1" border="0">
|
|
<tr>
|
|
<td valign="top">
|
|
<input type="hidden" value="" name="" id="objId">
|
|
<input type="hidden" value="true" name="tohtml">
|
|
|
|
|
|
<input style="display: none;" id="urlToUpload" name="url" type="text" size="49" onclick="" onchange="document.getElementById('queryImage').value=''">
|
|
<input id="imageToUpload" name="image" type="file" size="38" onclick="" onchange="document.getElementById('queryImage').value=''">
|
|
</td>
|
|
<td valign="top">
|
|
<input type="image" src="{{ url_for('static',filename='img/Search.png') }}" value="Search" title="Search" onclick="if (trim(document.getElementById('urlToUpload').value)=='' && trim(document.getElementById('imageToUpload').value)=='')return false;">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div align="center">
|
|
<table width="800">
|
|
{% if results != None%}
|
|
{% set columns = 0 %}
|
|
{% for idx in range(1) %}
|
|
{% if idx% 6 == 0 %}
|
|
<tr>
|
|
{% endif %}
|
|
{% set id = results[0] %}
|
|
{% set objectUrlSmall = 'img4class/' + id + '.jpg'%}
|
|
{% set title = id.split("/")[0] %}
|
|
{% set score = results[1] %}
|
|
<td>
|
|
<div>
|
|
<h2>{%print(score)%}, {%print(title)%}</h2>
|
|
<img title={{score}} style="width: 160px;" src="{%print(objectUrlSmall)%}" border="0">
|
|
<!--<br> <span style="font-size: x-small;"><h1>{%print(title)%}</h1></span><br>-->
|
|
</div>
|
|
</td>
|
|
{% set columns = columns + 1 %}
|
|
{% endfor %}
|
|
{% else %}
|
|
<h1>Unknown class</h1>
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html> |