wut-web cleanup

master 0.69
ml server 2020-01-22 16:14:35 -07:00
parent b680ae7f4c
commit 002cc31224
1 changed files with 5 additions and 20 deletions

View File

@ -62,7 +62,6 @@
"base_dir = ('/srv/satnogs/data')\n",
"sample_dir = ('/srv/satnogs/data/test/unvetted')\n",
"model_file = os.path.join(base_dir, 'models', 'wut-DUV-201912.tf')\n",
"num_test = 1\n",
"tmp_dir = tempfile.mkdtemp()\n",
"test_dir = os.path.join(tmp_dir)\n",
"os.makedirs(test_dir + '/unvetted', exist_ok=True)"
@ -88,7 +87,7 @@
"metadata": {},
"outputs": [],
"source": [
"shutil.copy2(rfile, test_dir + '/unvetted/')"
"shutil.copy(rfile, test_dir + '/unvetted/')"
]
},
{
@ -123,27 +122,13 @@
"outputs": [],
"source": [
"baserfile=os.path.basename(rfile)\n",
"print(\"Rating:\", baserfile)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(\"Rating:\", baserfile)\n",
"\n",
"prediction = model.predict(\n",
" x=test_data_gen,\n",
" verbose=0\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
")\n",
"\n",
"predictions=[]\n",
"prediction_bool = (prediction >0.8)\n",
"predictions = prediction_bool.astype(int)\n",