<commit_before>var dotenv = require('dotenv');
dotenv.load();

var express = require('express');
var bodyParser = require('body-parser');
var colors = require('colors');
var fs = require('fs');
var os = require('os');
var prettyjson = require('prettyjson');
var querystring = require('querystring');
var request = require('request');

// shell commands
require('shelljs/global');

var app = express();
app.use(bodyParser({limit: '50mb'}));
app.use(express.static(__dirname + '/uploaded_data'));
app.use(function(req, res, next) { // enable CORS
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  res.setHeader('Content-Type', 'application/json');
  next();
});


var port = 3000;

// for getting network data
var ifaces = os.networkInterfaces();

app.get('/', function (req, res) {
  res.sendFile(__dirname+'/landing/index.html');
});

app.post('/food-analysis', function (req, res) {
  res.setHeader('Content-Type', 'application/json');

  if (req.body.image) {<commit_msg>minor updates<commit_after>var dotenv = require('dotenv');
dotenv.load();

var express = require('express');
var bodyParser = require('body-parser');
var colors = require('colors');
var fs = require('fs');
var os = require('os');
var prettyjson = require('prettyjson');
var querystring = require('querystring');
var request = require('request');

// shell commands
require('shelljs/global');

var app = express();
app.use(bodyParser({limit: '50mb'}));
app.use(express.static(__dirname + '/uploaded_data'));
app.use(function(req, res, next) { // enable CORS
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  res.setHeader('Content-Type', 'application/json');
  next();
});


var port = 3000;

// for getting network data
var ifaces = os.networkInterfaces();

app.get('/', function (req, res) {
  res.setHeader('Content-Type', 'application/html');
  res.sendFile(__dirname+'/landing/index.html');
});

app.post('/food-analysis', function (req, res) {
  res.setHeader('Content-Type', 'application/json');

  if (req.body.image) {
{'fraction_non_alphanumeric': 0.19817767653758542, 'fraction_numerical': 0.005466970387243736, 'mean_word_length': 5.555223880597015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5748225', 'n_tokens_mistral': 709, 'n_tokens_neox': 689, 'n_words': 153}