Skip to content

Commit

Permalink
カテゴリ追加とスコア条件
Browse files Browse the repository at this point in the history
  • Loading branch information
kaminuma committed Dec 10, 2024
1 parent d84c536 commit e025838
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create_app():
# カテゴリの定義
app.config['CATEGORIES'] = [
"運動", "仕事", "学習", "趣味",
"食事", "睡眠", "買い物", "娯楽"
"食事", "睡眠", "買い物", "娯楽", "休憩", "家事"
]

return app
2 changes: 1 addition & 1 deletion app/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def fetch_data_by_period(start_date, end_date, user_id):

# 各活動にカテゴリを追加
data['category'] = [
result['labels'][0] ## if result['scores'][0] >= 0.5 else 'その他'
result['labels'][0] if result['scores'][0] >= 0.1 else 'その他'
for result in classifications
]

Expand Down

0 comments on commit e025838

Please sign in to comment.