Skip to content

Commit

Permalink
chore: Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoy committed Jan 31, 2021
1 parent c939b04 commit b712057
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/predict.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const classifierModelPromise = tf.loadLayersModel(MODEL_URL);

// This value greatly affects RAM usage due to USE
// Higher values will tend to yield better performance, but higher RAM usage
const SENTENCE_EMBEDDING_BATCH_SIZE = parseInt(process.env.SENTENCE_EMBEDDING_BATCH_SIZE || 200, 10);
const SENTENCE_EMBEDDING_BATCH_SIZE = parseInt(
process.env.SENTENCE_EMBEDDING_BATCH_SIZE || 200,
10,
);

const predict = async (sentences) => {
const useModel = await usePromise;
Expand Down
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ app.use(express.json());
const PREDICTION_CONCURRENCY = parseInt(process.env.PREDICTION_CONCURRENCY || os.cpus().length, 10);

const queue = new PQueue({
concurrency: PREDICTION_CONCURRENCY
concurrency: PREDICTION_CONCURRENCY,
});

app.post('/', async (req, res) => {
Expand Down

0 comments on commit b712057

Please sign in to comment.