<commit_before>if [[ -z "$FIREBASE_ADMIN_CREDENTIALS" ]]; then
    echo "*** Firbase admin credentials file reqiured! ***"
    echo "*** Set path to credentials json in FIREBASE_ADMIN_CREDENTIALS env variable ***"
    exit 1
fi

creds="./firebase_admin_creds.json"
cp $FIREBASE_ADMIN_CREDENTIALS $creds

if [ "$1" = "gae" ]; then

    
    mv default_config.yaml default_config.yaml.orig
    cp apiserver_config.yaml default_config.yaml

    rm -rf lib
    pip install -t lib -r ../requirements.txt
    rm lib/tensorflow/python/_pywrap_tensorflow_internal.so
    echo "" >  lib/tensorflow/__init__.py

    # dev_appserver.py app.yaml --dev_appserver_log_level debug
    yes Y | gcloud app deploy

    mv default_config.yaml.orig default_config.yaml
else if [ "$1" = "local" ]; then
        port=$2
        studio ui --config=apiserver_config.yaml --port=$port
    else
        echo "*** unknown target: $1"
        exit 1
    fi
fi

rm -f $creds<commit_msg>deploy_apiserver.sh asks for firebase crendetials file<commit_after>if [[ -z "$FIREBASE_ADMIN_CREDENTIALS" ]]; then
    echo "*** Firbase admin credentials file reqiured! ***"
    echo "Input path to firebase admin credentials json"
    echo "(you can also set FIREBASE_ADMIN_CREDENTIALS env variable manually):"
    read -p ">>" firebase_creds
else
    firebase_creds=$FIREBASE_ADMIN_CREDENTIALS
fi

if [ ! -f $firebase_creds ]; then
   echo " *** File $firebase_creds does not exist! ***"
   exit 1
fi

creds="./firebase_admin_creds.json"
cp $firebase_creds $creds

if [ "$1" = "gae" ]; then

    mv default_config.yaml default_config.yaml.orig
    cp apiserver_config.yaml default_config.yaml

    rm -rf lib
    pip install -t lib -r ../requirements.txt
    rm lib/tensorflow/python/_pywrap_tensorflow_internal.so
    echo "" >  lib/tensorflow/__init__.py

    # dev_appserver.py app.yaml --dev_appserver_log_level debug
    yes Y | gcloud app deploy

    mv default_config.yaml.orig default_config.yaml
else if [ "$1" = "local" ]; then
        port=$2
        studio ui --config=apiserver_config.yaml --port=$port
    else
        echo "*** unknown target: $1 (should be either gae or local) ***"
        exit 1
    fi
fi

rm -f $creds
rm -rf lib
{'fraction_non_alphanumeric': 0.1082427536231884, 'fraction_numerical': 0.005434782608695652, 'mean_word_length': 3.1522556390977443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4763917', 'n_tokens_mistral': 768, 'n_tokens_neox': 748, 'n_words': 204}