Skip to content

Commit 776e91e

Browse files
author
Intesar Haider
committed
added support for html pages too
1 parent 6fc094d commit 776e91e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

static/js/upload.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ $(function(){
22

33
var dropbox = $('#dropbox'),
44
message = $('.message', dropbox);
5+
var modelType = $('input[name=modelType]').val();
56

67
dropbox.filedrop({
78
paramname: 'file',
89
maxfiles: 10,
910
maxfilesize: 5,
10-
url: '/upload',
11+
url: '/upload/'+modelType,
1112
uploadFinished:function(i,file,response){
1213
//console.log(response);
1314
//$.data(file).find('.carName_prediction').show();

templates/car_make.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<body>
1212

1313
<a href="/"><input type=”button” value="Go Back"></a>
14+
<input id="modelType" name="modelType" value="car_make" type="hidden"/>
15+
1416
<div id="dropbox">
1517
<h1 align="center">Car Make Prediction</h1>
1618
<span class="message">Drop images here to predict.</span>

templates/car_model.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
</head>
1111
<body>
1212
<a href="/"><input type=”button” value="Go Back"></a>
13+
<input id="modelType" name="modelType" value="car_model" type="hidden"/>
14+
1315
<div id="dropbox">
1416
<h1 align="center">Car Model Prediction</h1>
1517
<span class="message">Drop images here to predict.</span>

0 commit comments

Comments
 (0)