From 637ec60544a5e5620fb86fe335c12fbb632dfb08 Mon Sep 17 00:00:00 2001 From: Camerin Figueroa Date: Sat, 15 Jan 2022 13:35:11 -0500 Subject: [PATCH] Added rounding to load percent of the model --- src/actions/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/index.js b/src/actions/index.js index ea474b0..e4501e0 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -1,7 +1,7 @@ import github from '../apis/github'; import api from '../apis/api'; import * as tf from '@tensorflow/tfjs'; - +import _ from 'lodash'; export const getUser = (username) => async (dispatch, getState) => { const response = await github.get(`/users/${username}`); @@ -100,7 +100,7 @@ export const downloadModel = () => async (dispatch, getState) => { dispatch({ type: 'SET_PROGRESS', - payload: p.toFixed(2)*100 + payload: _.round(p) }); } }