<commit_before>#\ -s puma
require 'sinatra'
require 'bundler/setup'
require 'rubygems'
require 'algoliasearch'
require_relative "api/api"
require 'rack/cors'
require_relative 'main'

use Rack::Cors do
  allow do
    origins '*'
    resource '*', headers: :any, methods: [:post, :get]
  end
end



# run API::API
run Rack::Cascade.new [API::API, Main]<commit_msg>Add rack defalater<commit_after>#\ -s puma
require 'sinatra'
require 'bundler/setup'
require 'rubygems'
require 'algoliasearch'
require_relative "api/api"
require 'rack/cors'
require_relative 'main'

use Rack::Deflater, :if => lambda { |env, status, headers, body| body.length > 512 }
use Rack::Cors do
  allow do
    origins '*'
    resource '*', headers: :any, methods: [:post, :get]
  end
end



# run API::API

run Rack::Cascade.new [API::API, Main]
{'fraction_non_alphanumeric': 0.1460122699386503, 'fraction_numerical': 0.0036809815950920245, 'mean_word_length': 4.787234042553192, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2576851', 'n_tokens_mistral': 311, 'n_tokens_neox': 298, 'n_words': 85}