summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/faceAnalysis/faceAnalysis.actions.js2
-rw-r--r--client/faceAnalysis/faceAnalysis.result.js26
2 files changed, 18 insertions, 10 deletions
diff --git a/client/faceAnalysis/faceAnalysis.actions.js b/client/faceAnalysis/faceAnalysis.actions.js
index f8d8973f..2d372c1e 100644
--- a/client/faceAnalysis/faceAnalysis.actions.js
+++ b/client/faceAnalysis/faceAnalysis.actions.js
@@ -8,7 +8,7 @@ import { get, post } from '../util'
// urls
const url = {
- upload: () => process.env.API_HOST + '/task/upload/blur',
+ upload: () => process.env.API_HOST + '/task/upload/demo',
}
export const publicUrl = {
}
diff --git a/client/faceAnalysis/faceAnalysis.result.js b/client/faceAnalysis/faceAnalysis.result.js
index 63a23d65..fd079529 100644
--- a/client/faceAnalysis/faceAnalysis.result.js
+++ b/client/faceAnalysis/faceAnalysis.result.js
@@ -1,7 +1,6 @@
import React, { Component } from 'react'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
-import { courtesyS } from '../util'
import * as actions from './faceAnalysis.actions'
import { Loader } from '../common'
@@ -63,16 +62,25 @@ class FaceAnalysisResult extends Component {
<div className='result'></div>
)
}
- let blurImg = data.data.blur_fn && (
- <div>
- <img src={data.data.blur_fn} />
- <span>Blurred image</span>
- </div>
- )
+ const results = ['blur_fn', 'landmarks_3d_68'].map(tag => {
+ if (tag in data.data) {
+ const { title, url } = data.data[tag]
+ return (
+ <div key={tag}>
+ <img src={url} />
+ <span>{title}</span>
+ </div>
+ )
+ }
+ return null
+ }).filter(a => a)
+
return (
- <div className='result'>
+ <div>
{!(step && total && message) ? '' : (<span>{step} / {total}: {message}</span>)}
- {blurImg}
+ <div className='results'>
+ {results}
+ </div>
<div className="about">
<small>Query took {(timing / 1000).toFixed(2)} s.</small>
</div>