David Kagramanyan
commited on
Commit
·
c1584e7
1
Parent(s):
ac50d39
added logs
Browse files- app.py +2 -0
- classifier.ipynb +2 -0
app.py
CHANGED
@@ -25,6 +25,8 @@ def classify(input_text_message: str):
|
|
25 |
|
26 |
confidences = {labels[i]: float(prediction[i]) for i in range(3)}
|
27 |
|
|
|
|
|
28 |
return confidences
|
29 |
|
30 |
labels = ['eastern armenian', 'western armenian', 'grabar (classic) armenian']
|
|
|
25 |
|
26 |
confidences = {labels[i]: float(prediction[i]) for i in range(3)}
|
27 |
|
28 |
+
logger.info(time.strftime("%Y.%m.%d, %H:%M:%S")+' '+'result '+confidences)
|
29 |
+
|
30 |
return confidences
|
31 |
|
32 |
labels = ['eastern armenian', 'western armenian', 'grabar (classic) armenian']
|
classifier.ipynb
CHANGED
@@ -69,6 +69,8 @@
|
|
69 |
" prediction=loaded_rf.predict_proba(data)[0]\n",
|
70 |
"\n",
|
71 |
" confidences = {labels[i]: float(prediction[i]) for i in range(3)}\n",
|
|
|
|
|
72 |
" \n",
|
73 |
" return confidences\n",
|
74 |
"\n",
|
|
|
69 |
" prediction=loaded_rf.predict_proba(data)[0]\n",
|
70 |
"\n",
|
71 |
" confidences = {labels[i]: float(prediction[i]) for i in range(3)}\n",
|
72 |
+
"\n",
|
73 |
+
" logger.info(time.strftime(\"%Y.%m.%d, %H:%M:%S\")+' '+'result '+confidences)\n",
|
74 |
" \n",
|
75 |
" return confidences\n",
|
76 |
"\n",
|