fudii0921 commited on
Commit
87d6480
·
verified ·
1 Parent(s): debe02d

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +585 -0
app.py ADDED
@@ -0,0 +1,585 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from google import genai
3
+ from google.genai import types
4
+ import os
5
+ from dotenv import load_dotenv
6
+ import tempfile
7
+ #pip3 install pdfkit' と 'brew install wkhtmltopdf'を実行してください
8
+
9
+ # Load environment variables
10
+ load_dotenv()
11
+
12
+ # Configure the Gemini client
13
+ # NOTE: Make sure your GEMINI_API_KEY is set in your .env file
14
+ client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
15
+
16
+ # Define the grounding tool
17
+ grounding_tool = types.Tool(
18
+ google_search=types.GoogleSearch()
19
+ )
20
+
21
+ eval_kijyun = "評価会議のための質問事項(ディスカッションガイド)1. イントロダクションと全体像の確認対象質問・論点目的評価者「この評価レポートの意図は、過去を裁くことではなく、今後の成長を最大化することです。まず、レポートの全体的な評価について、あなたの最初の感想を教えてください。」建設的な雰囲気を作り、自己評価と他者評価のギャップを認識させる。評価者「期間を通じて、あなたが設定していた最も重要な目標は何でしたか?その目標達成について、自己評価はどの程度ですか?」評価の焦点を合わせ、本人の認識を明確にする。2. 業績評価に関する質問(成果の深掘り)対象質問・論点目的コンサルタント「期間中、あなたが最も価値を提供できたと実感しているプロジェクト(または成果物)はどれですか?具体的にクライアントにどのようなインパクトを与えましたか?」本人が誇る成果を確認し、具体的な事例を掘り下げる。評価者「『プロジェクト〇〇』での目標達成度は高いと評価しましたが、その成功の**最も大きな要因(KFS)**は何だったと考えますか?」成功の再現性を高めるための要因分析を促す。評価者「逆に、目標を達成できなかった、あるいは難航したプロジェクトについて、主要なボトルネックは何でしたか?それはコントロール可能な要因とコントロール不能な要因のどちらでしたか?」失敗からの学びを引き出し、客観的な状況分析力を評価する。評価者「ファームへの貢献(ナレッジ共有、採用など)で特に注力した点はありますか?その活動を通じてチームにどのような変化をもたらしましたか?」チーム・組織へのコミットメントと影響力を評価する。3. 能力評価に関する質問(スキルの具体化)対象質問・論点目的評価者「能力評価において『問題解決・論理的思考力』を高く評価しましたが、これを最もよく示していた具体的な行動や発言を一つ教えてください。」評価者の判断根拠を共有し、評価の納得度を高める。コンサルタント「次期に向けて、コンサルタントとして最も強化が必要だと感じているスキルは何ですか?なぜそれが重要だと考えますか?」課題意識と成長意欲、そして自己認識の正確さを評価する。評価者「あなたの提案資料は非常に論理的でしたが、**『伝達力』**の項目で改善点があると評価したのは、どのような場面(例:クライアントとの交渉、経営層へのプレゼン)でのことですか?」定性的な評価について、具体的な場面(コンテキスト)を示してフィードバックする。4. 行動評価に関する質問(プロセスとプロフェッショナリズム)対象質問・論点目的評価者「『プロジェクトA』の緊迫した状況下で、あなたはチームに対してどのようなリーダーシップを発揮しましたか?具体的な行動を教えてください。」プレッシャー下での行動やチームへの影響力を評価する。コンサルタント「期間中の業務プロセスを振り返って、より良い結果を出すために一つだけ変えられるとしたら、どの時点のどの行動を変えますか?」振り返りから改善につなげる内省力と、行動の重要性を理解しているかを評価する。評価者「クライアントとのコミュニケーションにおいて、特に信頼関係を深めるために意識的に行っていたことは何ですか?結果としてどうなりましたか?」クライアントリレーション構築における意識的な努力と、その結果を評価する。5. 総括とネクストステップ(キャリア開発)対象質問・論点目的評価者「総合的に見て、次の職位(例:マネージャー)へ昇進するために、現時点で最も不足していると判断するスキルや行動は何ですか? 具体的な基準に照らして説明します。」次の職位への期待値(卒業要件)を明確に伝え、ギャップを埋めるための目標設定につなげる。コンサルタント「この評価結果を踏まえ、次期の重点目標としてレポートに記載した内容(専門性向上やキャリアゴール)は、あなたのキャリアパスと合致していますか?」個人の目標とファームのニーズとの整合性を確認する。コンサルタント「目標達成のために、ファーム(評価者やチーム)にどのようなサポートやリソースを期待しますか?」育成計画に必要なリソースや環境整備について具体的に議論する。評価者「この評価レビューを通じて、他に懸念点や疑問点はありますか?私からのフィードバックに納得できない点があれば、ぜひ教えてください。」相互理解を深め、オープンな関係を維持したまま会議を終える。"
22
+
23
+
24
+ template = """
25
+
26
+ <!DOCTYPE html>
27
+ <html lang="ja">
28
+ <head>
29
+ <meta charset="UTF-8">
30
+ <title>コンサルタント パフォーマンスレポート:コンサルタント名前</title>
31
+ <style>
32
+ body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; margin: 20px; background-color: #f9f9f9; }
33
+ h1, h2, h3, h4 { color: #0056b3; }
34
+ h1 { border-bottom: 2px solid #0056b3; padding-bottom: 10px; }
35
+ h2 { border-bottom: 1px solid #ccc; padding-bottom: 5px; margin-top: 30px; }
36
+ h3 { color: #007bff; margin-top: 25px; }
37
+ h4 { color: #555; margin-top: 15px; }
38
+ .section { background-color: #fff; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); padding: 20px; margin-bottom: 20px; }
39
+ .detail-item { margin-bottom: 10px; }
40
+ .comment { background-color: #e9f5ff; border-left: 3px solid #007bff; padding: 10px; margin-top: 5px; }
41
+ .self-eval { background-color: #f5f5f5; border-left: 3px solid #ccc; padding: 10px; margin-top: 5px; }
42
+ .kudos { color: green; font-weight: bold; }
43
+ .focus-area { color: orange; font-weight: bold; }
44
+ ul { list-style-type: disc; margin-left: 20px; }
45
+ p { margin-bottom: 5px; }
46
+ </style>
47
+ </head>
48
+ <body>
49
+
50
+ <div class="section">
51
+ <h1>コンサルタント パフォーマンスレポート</h1>
52
+ <h2>1. 基本情報</h2>
53
+ <p><strong>被評価者氏名:</strong> コンサルタント名前</p>
54
+ <p><strong>職位/役職:</strong> シニアアソシエイト</p>
55
+ <p><strong>評価期間:</strong> 期間(xxxx年4月1日 〜 xxxx年3月31日</p>
56
+ <p><strong>評価者氏名:</strong> 評価者名前</p>
57
+ <p><strong>評価日:</strong> xxxx年xx月xx日</p>
58
+ </div>
59
+
60
+ <div class="section">
61
+ <h2>プロジェクト別評価</h2>
62
+
63
+ <h3>XXXコスト削減プロジェクト(大手製造業のコスト構造改革)</h3>
64
+ <div class="detail-item">
65
+ <h4>主要プロジェクトの達成目標</h4>
66
+ <div class="self-eval">
67
+ <p><strong>自己評価:</strong> 契約目標(コスト10%削減)に対し、12%の削減プランを策定し、初年度実行目標(5%削減)を達成。データ収集と経営層向け報告書作成を主導。</p>
68
+ </div>
69
+ <div class="comment">
70
+ <p><strong>評価者コメント:</strong> A+評価。田中さんのシミュレーションモデルは迅速かつ正確で、定量的目標を上回る結果に大きく貢献した。</p>
71
+ </div>
72
+ </div>
73
+ <div class="detail-item">
74
+ <h4>クライアント満足度</h4>
75
+ <div class="self-eval">
76
+ <p><strong>自己評価:</strong> クライアント担当者(部長層)と密に連携し、複雑なデータ要件を円滑に調整。プロジェクト後のアンケートで「非常に満足」を獲得し、後続案件の受注に貢献した。</p>
77
+ </div>
78
+ <div class="comment">
79
+ <p><strong>評価者コメント:</strong> クライアントとの専門的なやり取りはスムーズ。ただし、部門間の利害調整が難航した際、一歩踏み込んだファシリテーションの機会を逸した点は、マネージャー昇進に向けての改善点となる。</p>
80
+ </div>
81
+ </div>
82
+ <div class="detail-item">
83
+ <h4>実行力・責任感(全プロジェクト共通だが、特にこの高成果プロジェクトで顕著)</h4>
84
+ <div class="self-eval">
85
+ <p><strong>自己評価:</strong> 期間を通じて、担当タスクの納期遅延やミスの発生はゼロ。クライアントへの提出物については、常にレビュー期限より1日早く準備を完了させた。</p>
86
+ </div>
87
+ <div class="comment">
88
+ <p><strong>評価者コメント:</strong> 計画的で極めて責任感が強い。自身のタスク管理については完璧。次期は、プロジェクト全体の進捗リスクを先読みし、評価者に報告する頻度を増やしてほしい。</p>
89
+ </div>
90
+ </div>
91
+
92
+ <h3>XXX化学新規事業戦略策定プロジェクト(新規事業参入戦略)</h3>
93
+ <div class="detail-item">
94
+ <h4>問題解決・論理的思考力</h4>
95
+ <div class="self-eval">
96
+ <p><strong>自己評価:</strong> 膨大な市場データから「参入すべきではない理由」を深く検証するクリティカルな仮説を提示し、戦略の精度を向上させた。</p>
97
+ </div>
98
+ <div class="comment">
99
+ <p><strong>評価者コメント:</strong> 分析能力と論理構造の構築力は極めて高い。今後は、複雑な事象をさらにシンプルな「メッセージ」に落とし込む際の、大胆さと示唆の鋭さを磨く必要がある。</p>
100
+ </div>
101
+ </div>
102
+ <div class="detail-item">
103
+ <h4>専門知識とスキル</h4>
104
+ <div class="self-eval">
105
+ <p><strong>自己評価:</strong> 製造業のコストマネジメントに関する最新の手法を自習し、信越化学新規事業戦略策定プロジェクトで即座に適用した。財務モデリングスキルも向上した。</p>
106
+ </div>
107
+ <div class="comment">
108
+ <p><strong>評価者コメント:</strong> 技術的な専門性は申し分ない。特にデータ分析ツール(Python/R)の活用能力は、ファーム内でもトップクラス。</p>
109
+ </div>
110
+ </div>
111
+ <div class="detail-item">
112
+ <h4>リーダーシップ・影響力</h4>
113
+ <div class="self-eval">
114
+ <p><strong>自己評価:</strong> プロジェクトの終盤でチームの士気が低下した際、自発的にチームミーティングを企画し、残りのタスクを再分配することで、チームを再結集させた。</p>
115
+ </div>
116
+ <div class="comment">
117
+ <p><strong>評価者コメント:</strong> 個人的なタスク遂行能力の高さから、ときにチームメンバーのフォローを待たずに単独で進めてしまう傾向が見られた。今後は、仕事を「任せる(委譲する)」スキルを意識的に磨き、チーム全体の生産性を向上させてほしい。</p>
118
+ </div>
119
+ </div>
120
+ </div>
121
+
122
+ <div class="section">
123
+ <h2>ファームへの貢献と総合評価</h2>
124
+ <div class="detail-item">
125
+ <h4>ファームへの貢献</h4>
126
+ <div class="self-eval">
127
+ <p><strong>自己評価:</strong> 期間中に新たに参画したメンバー(2名)に対し、社内ナレッジベースの使い方、主要な分析ツールの操作方法についてOJTを実施。社内勉強会で「製造業のサプライチェーン改革」に関する発表を行った。</p>
128
+ </div>
129
+ <div class="comment">
130
+ <p><strong>評価者コメント:</strong> 新メンバーへの導入支援は模範的であり、早期戦力化に貢献。ナレッジ共有の取り組みも積極的で、ファームの知識資本への貢献度が高い。</p>
131
+ </div>
132
+ </div>
133
+ <div class="detail-item">
134
+ <h4>コミュニケーション・プレゼン能力</h4>
135
+ <div class="self-eval">
136
+ <p><strong>自己評価:</strong> 経営会議でのプレゼンテーションにおいて、質疑応答で専門外の質問にも冷静かつ的確に対応し、承認を得た。</p>
137
+ </div>
138
+ <div class="comment">
139
+ <p><strong>評価者コメント:</strong> 経営層との対話能力は高いが、非専門家(例:現場のスタッフ)に対して専門用語を使わずに、解決策の「必要性」と「メリット」を伝える工夫が必要である。</p>
140
+ </div>
141
+ </div>
142
+ <div class="detail-item">
143
+ <h4>チームワーク・協調性</h4>
144
+ <div class="self-eval">
145
+ <p><strong>自己評価:</strong> 新任のアソシエイトからの質問に常に快く答え、タスクが遅延しそうなメンバーに対しては、期日前に声をかけてサポートを提供した。</p>
146
+ </div>
147
+ <div class="comment">
148
+ <p><strong>評価者コメント:</strong> チーム内での人望が厚く、ポジティブな職場環境づくりに貢献している。</p>
149
+ </div>
150
+ </div>
151
+
152
+ <h3>総合評価(評価者による)</h3>
153
+ <ul>
154
+ <li><strong>業績:</strong> A</li>
155
+ <li><strong>能力:</strong> A+</li>
156
+ <li><strong>行動:</strong> A</li>
157
+ </ul>
158
+
159
+ <h3>総括(評価者記入欄)</h3>
160
+ <div class="comment">
161
+ <p><span class="kudos">期間中の最も優れていた点(Kudos):</span></p>
162
+ <p>田中さんは、期間を通じて極めて高い分析力と責任感を発揮し、特にコニカコスト削減プロジェクトでは目標を上回る成果に決定的に貢献しました。シミュレーションモデルの正確性と、期限厳守の姿勢は、ファームの信頼を高めています。次の職位(マネージャー)への昇進に必要な問題解決能力と専門知識は完全に満たしていると評価します。</p>
163
+
164
+ <p><span class="focus-area">成長のための主要な改善点(Focus Area):</span></p>
165
+ <p>次期は、単なるタスク遂行者から「プロジェクトのオーナー」へと意識をシフトする必要があります。特に、クライアントやチームに対して、明確な方向性を提示するファシリテーション力と、自らのタスクを適切に任せて成果を出す「委譲と育成」のリーダーシップを重点的に強化してください。</p>
166
+ </div>
167
+
168
+ <h3>今後の目標とネクストステップ</h3>
169
+ <div class="detail-item">
170
+ <h4>専門性向上</h4>
171
+ <p><strong>目標設定:</strong> M&A後のPMI(Post Merger Integration)に関する専門知識とケーススタディを習得し、関連プロジェクトに参画する。</p>
172
+ <p><strong>サポート・トレーニング計画:</strong> 外部M&A専門家によるトレーニングプログラム(全3回)への参加。プロジェクトB'のPMIフェーズへのアサインメント。</p>
173
+ </div>
174
+ <div class="detail-item">
175
+ <h4>キャリアゴール</h4>
176
+ <p><strong>目標設定:</strong> 評価期間内にマネージャーへのプロモーションを目指す。そのために、チームメンバー2名に対し、デリバラブル作成に関するメンタリングを最低3ヶ月実施する。</p>
177
+ <p><strong>サポート・トレーニング計画:</strong> 佐藤(評価者)による月次の1on1ミーティングを設定し、委譲と育成の進捗をレビューする。シニアマネージャーが主催するリーダーシップ・ワークショップへの招待。</p>
178
+ </div>
179
+ </div>
180
+
181
+ <div class="section">
182
+ <h2>最終承認</h2>
183
+ <p><strong>被評価者 署名:</strong> コンサルタント名前</p>
184
+ <p><strong>評価者 署名:</strong> 評価者名前</p>
185
+ <p><strong>日付:</strong> xxxx年xx月xx日</p>
186
+ </div>
187
+
188
+ </body>
189
+ </html>
190
+ """
191
+
192
+
193
+ # Define the generation settings
194
+ config = types.GenerateContentConfig(
195
+ tools=[grounding_tool]
196
+ )
197
+
198
+ def change_input(prompt):
199
+ if len(prompt) > 0:
200
+ return gr.update(visible=True)
201
+ else:
202
+ return gr.update(visible=False)
203
+
204
+
205
+ # --- Python function for the Gradio app ---
206
+ def generate_response(prompt):
207
+ """
208
+ This function takes a user's prompt, calls the Gemini API
209
+ with the performance evaluation tool, and returns the response text.
210
+ """
211
+ try:
212
+ final_prompt = prompt + f'{eval_kijyun}に基づいて{prompt}に記載されているコンサルタントのパフォーマンスをプロジェクト毎に分けて評価してください。必ず、評価者の総合評価を詳しく記載してください。答えは{template}に合わせてHTML形式にしてください'
213
+ response = client.models.generate_content(
214
+ model="gemini-2.5-flash",
215
+ contents=final_prompt,
216
+ config=config,
217
+ )
218
+ #print(response.text)
219
+ final_html = response.text
220
+ final_html = final_html.replace("```html", "")
221
+ final_html = final_html.replace("```", "")
222
+
223
+ with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".html", encoding="utf-8") as tmp_file:
224
+ # レポート内容をファイルに書き込む
225
+ #pdfkit.from_string(final_html, tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".pdf", encoding="utf-8").name)
226
+ tmp_file.write(final_html)
227
+
228
+ # ファイルパスを取得
229
+ file_path = tmp_file.name
230
+ return final_html,file_path
231
+ except Exception as e:
232
+ return f"An error occurred: {e}"
233
+
234
+ # --- Gradio UI Block ---
235
+ with gr.Blocks(title="Gemini API with Performance Review", css="""footer {visibility: hidden;} #header {display: flex; justify-content: space-between; align-items: center; font-size: 24px; font-weight: bold;} #logo {width: 50px; height: 50px;}""" ) as gsearch:
236
+ with gr.Sidebar(open=False):
237
+ gr.Textbox(label="サンプル1",show_copy_button=True, value="""コンサルタント パフォーマンスレポート
238
+ 被評価者氏名 田中 太郎
239
+ 職位/役職 シニアアソシエイト
240
+ 評価期間: 2024年4月1日 〜 2025年3月31日
241
+
242
+ 1. 業績評価の概要(総合評価:A)
243
+ 田中氏は、期間中、極めて優れた業績を達成しました。特に「コニカコスト削減プロ���ェクト」では、契約目標であるコスト10%削減に対し、12%の削減プランを策定し、初年度実行目標を達成しました。この成功において、田中氏が主導したシミュレーションモデルは、迅速かつ正確であり、定量的目標を上回る結果に決定的に貢献したと評価されています(A+評価)。
244
+
245
+ クライアント満足度も非常に高く、「非常に満足」の評価を得て後続案件の受注に貢献しましたが、部門間の利害調整が難航した際、一歩踏み込んだファシリテーションの機会を逸した点が、今後の改善点として挙げられています。また、ファームへの貢献としては、新メンバー2名へのOJT実施や、社内勉強会での積極的なナレッジ共有が高く評価されています。
246
+
247
+ 2. 能力評価の概要(総合評価:A+)
248
+ 田中氏の能力評価は「A+」であり、その核となる「問題解決・論理的思考力」は極めて高いと評価されています。
249
+
250
+ 「信越化学新規事業戦略策定プロジェクト」では、市場データから**「参入すべきではない理由」を検証するクリティカルな仮説**を提示し、戦略の精度を向上させました。専門知識(特にデータ分析ツール:Python/Rの活用能力)についてもファーム内トップクラスとされています。
251
+
252
+ 一方で、さらなる成長のためには、複雑な分析結果を経営層だけでなく非専門家(現場スタッフ)に対し、**シンプルな「メッセージ」や「必要性・メリット」として伝える際の「大胆さと示唆の鋭さ」**を磨くことが求められています。
253
+
254
+ 3. 行動評価の概要(総合評価:A)
255
+ リーダーシップと責任感においても、田中氏は高い評価を得ています。「信越化学新規事業戦略策策定プロジェクト」の終盤でチームの士気が低下した際、自発的なミーティングを企画してタスクを再分配し、チームを再結集させたことは、その影響力を示す具体的な事例です。
256
+
257
+ また、担当タスクの納期遅延やミスの発生はゼロであり、極めて高い実行力と責任感を証明しています。
258
+
259
+ 主要な改善点として、自身のタスク遂行能力の高さゆえに、チームメンバーへの「委譲(任せる)」スキルが不足している点が指摘されました。次期は、仕事を適切に分散させ、チーム全体の生産性を向上させるためのリーダーシップの強化が必要です。
260
+
261
+ 4. 総括と次期への焦点
262
+ 期間中の最も優れていた点(Kudos)
263
+ 田中氏は、マネージャーへの昇進に必要な問題解決能力と専門知識を完全に満たしていると評価されています。高い分析力と責任感は、ファームの信頼構築に不可欠な要素です。
264
+
265
+ 成長のための主要な改善点(Focus Area)
266
+ 次期は、単なるタスク遂行者から**「プロジェクトのオーナー」へと意識をシフトすること**が最重要課題です。
267
+
268
+ 具体的には、クライアントやチームに対して明確な方向性を提示するファシリテーション力と、自らのタスクを適切に任せて成果を出す「委譲と育成」のリーダーシップを重点的に強化する必要があります。""")
269
+ gr.HTML(label="サンプル2",value="""<!DOCTYPE html>
270
+ <html lang="ja">
271
+ <head>
272
+ <meta charset="UTF-8">
273
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
274
+ <title>コンサルタント パフォーマンスレポート</title>
275
+ <!-- Tailwind CSS CDNをロード -->
276
+ <script src="https://cdn.tailwindcss.com"></script>
277
+ <style>
278
+ /* フォント設定 (日本語に配慮し、Interを代替として使用) */
279
+ body {
280
+ font-family: "Inter", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
281
+ }
282
+ /* テーブルの構造を強化 */
283
+ .report-table th {
284
+ background-color: #f3f4f6; /* bg-gray-100 */
285
+ color: #4b5563; /* text-gray-700 */
286
+ font-weight: 600; /* font-semibold */
287
+ padding: 0.75rem; /* p-3 */
288
+ border-bottom: 1px solid #e5e7eb; /* border-b */
289
+ text-align: left;
290
+ }
291
+ .report-table td {
292
+ padding: 0.75rem; /* p-3 */
293
+ border-bottom: 1px solid #e5e7eb; /* border-b */
294
+ color: #374151; /* text-gray-800 */
295
+ }
296
+ .section-header {
297
+ font-size: 1.5rem; /* text-2xl */
298
+ font-weight: 700; /* font-bold */
299
+ color: #4338ca; /* text-indigo-700 */
300
+ border-bottom: 2px solid #e0e7ff; /* border-b-2 border-indigo-200 */
301
+ padding-bottom: 0.5rem; /* pb-2 */
302
+ margin-bottom: 1.5rem; /* mb-6 */
303
+ }
304
+ .score {
305
+ display: inline-block;
306
+ padding: 0.25rem 0.75rem;
307
+ border-radius: 9999px;
308
+ font-weight: 800;
309
+ color: white;
310
+ background-color: #10b981; /* Emerald-500 */
311
+ }
312
+ </style>
313
+ </head>
314
+ <body class="bg-gray-100 p-4 sm:p-8">
315
+ <div class="max-w-5xl mx-auto bg-white rounded-xl shadow-2xl p-6 sm:p-10 space-y-10">
316
+ <!-- レポートタイトル -->
317
+ <header class="text-center pb-6 border-b border-gray-200">
318
+ <h1 class="text-3xl sm:text-4xl font-extrabold text-indigo-800">コンサルタント パフォーマンスレポート</h1>
319
+ <p class="text-gray-500 mt-2 text-lg">期間評価結果</p>
320
+ </header>
321
+
322
+ <!-- 1. 基本情報 -->
323
+ <section class="space-y-4">
324
+ <h2 class="section-header">1. 基本情報</h2>
325
+ <div class="overflow-x-auto rounded-lg border border-gray-200">
326
+ <table class="min-w-full divide-y divide-gray-200 report-table">
327
+ <tbody>
328
+ <tr>
329
+ <th class="w-1/4">被評価者氏名</th>
330
+ <td class="w-3/4 font-bold text-lg text-gray-900">田中 太郎</td>
331
+ </tr>
332
+ <tr>
333
+ <th>職位/役職</th>
334
+ <td>シニアアソシエイト</td>
335
+ </tr>
336
+ <tr>
337
+ <th>評価期間</th>
338
+ <td>2024年4月1日 〜 2025年3月31日</td>
339
+ </tr>
340
+ <tr>
341
+ <th>評価者氏名</th>
342
+ <td>佐藤 花子</td>
343
+ </tr>
344
+ <tr>
345
+ <th>評価日</th>
346
+ <td>2025年4月20日</td>
347
+ </tr>
348
+ </tbody>
349
+ </table>
350
+ </div>
351
+ </section>
352
+
353
+ <!-- 2. 業績評価:プロジェクト実績と成果 -->
354
+ <section class="space-y-4">
355
+ <h2 class="section-header">2. 業績評価:プロジェクト実績と成果 (定量/定性)</h2>
356
+ <div class="overflow-x-auto rounded-lg border border-gray-200">
357
+ <table class="min-w-full divide-y divide-gray-200 report-table">
358
+ <thead>
359
+ <tr>
360
+ <th class="w-1/5">評価軸</th>
361
+ <th class="w-2/5">自己評価(達成度・貢献内容)</th>
362
+ <th class="w-2/5">評価者コメント(事実に基づいたフィードバック)</th>
363
+ </tr>
364
+ </thead>
365
+ <tbody>
366
+ <tr>
367
+ <td>**主要プロジェクトの達成目標**</td>
368
+ <td>コニカコスト削減プロジェクト(大手製造業のコスト構造改革): 契約目標(コスト10%削減)に対し、12%の削減プランを策定し、初年度実行目標(5%削減)を達成。データ収集と経営層向け報告書作成を主導。</td>
369
+ <td class="bg-blue-50/50">A+評価。 田中さんのシミュレーションモデルは迅速かつ正確で、定量的目標を上回る結果に大きく貢献した。</td>
370
+ </tr>
371
+ <tr>
372
+ <td>**クライアント満足度**</td>
373
+ <td>コニカプロジェクトにてクライアント担当者(部長層)と密に連携し、複雑なデータ要件を円滑に調整。プロジェクト後のアンケートで**「非常に満足」**を獲得し、後続案件の受注に貢献した。</td>
374
+ <td>クライアントとの専門的なやり取りはスムーズ。ただし、部門間の利害調整が難航した際、一歩踏み込んだファシリテーションの機会を逸した点は、マネージャー昇進に向けての改善点となる。</td>
375
+ </tr>
376
+ <tr>
377
+ <td>**ファームへの貢献**</td>
378
+ <td>期間中に新たに参画したメンバー(2名)に対し、社内ナレッジベースの使い方、主要な分析ツールの操作方法についてOJTを実施。社内勉強会で「製造業のサプライチェーン改革」に関する発表を行った。</td>
379
+ <td>新メンバーへの導入支援は模範的であり、早期戦力化に貢献。ナレッジ共有の取り組みも積極的で、ファームの知識資本への貢献度が高い。</td>
380
+ </tr>
381
+ </tbody>
382
+ </table>
383
+ </div>
384
+ <div class="text-right pt-4">
385
+ <span class="font-bold text-xl text-gray-700">【総合評価(業績)】</span>
386
+ <span class="text-3xl font-extrabold text-green-600 ml-2 score bg-green-600">A</span>
387
+ </div>
388
+ </section>
389
+
390
+ <!-- 3. 能力評価:スキルとプロフェッショナリズム -->
391
+ <section class="space-y-4">
392
+ <h2 class="section-header">3. 能力評価:スキルとプロフェッショナリズム</h2>
393
+ <div class="overflow-x-auto rounded-lg border border-gray-200">
394
+ <table class="min-w-full divide-y divide-gray-200 report-table">
395
+ <thead>
396
+ <tr>
397
+ <th class="w-1/5">評価項目</th>
398
+ <th class="w-2/5">自己評価(発揮できた具体的な事例)</th>
399
+ <th class="w-2/5">評価者コメント(改善点と成長の可能性)</th>
400
+ </tr>
401
+ </thead>
402
+ <tbody>
403
+ <tr>
404
+ <td>**問題解決・論理的思考力**</td>
405
+ <td>信越化学新規事業戦略策定プロジェクト(新規事業参入戦略)にて、膨大な市場データから「参入すべきではない理由」を深く検証するクリティカルな仮説を提示し、戦略の精度を向上させた。</td>
406
+ <td class="bg-blue-50/50">分析能力と論理構造の構築力は極めて高い。今後は、複雑な事象をさらにシンプルな「メッセージ」に落とし込む際の、大胆さと示唆の鋭さを磨く必要がある。</td>
407
+ </tr>
408
+ <tr>
409
+ <td>**専門知識とスキル**</td>
410
+ <td>製造業のコストマネジメントに関する最新の手法を自習し、信越化学新規事業戦略策定プロジェクトで即座に適用した。財務モデリングスキルも向上した。</td>
411
+ <td>技術的な専門性は申し分ない。特にデータ分析ツール(Python/R)の活用能力は、ファーム内でもトップクラス。</td>
412
+ </tr>
413
+ <tr>
414
+ <td>**コミュニケーション・プレゼン能力**</td>
415
+ <td>経営会議でのプレゼンテーションにおいて、質疑応答で専門外の質問にも冷静かつ的確に対応し、承認を得た。</td>
416
+ <td>経営層との対話能力は高いが、非専門家(例:現場のスタッフ)に対して専門用語を使わずに、**解決策の「必要性」と「メリット」**を伝える工夫が必要である。</td>
417
+ </tr>
418
+ </tbody>
419
+ </table>
420
+ </div>
421
+ <div class="text-right pt-4">
422
+ <span class="font-bold text-xl text-gray-700">【総合評価(能力)】</span>
423
+ <span class="text-3xl font-extrabold ml-2 score bg-indigo-600">A+</span>
424
+ </div>
425
+ </section>
426
+
427
+ <!-- 4. 行動評価:リーダーシップとチーム貢献 -->
428
+ <section class="space-y-4">
429
+ <h2 class="section-header">4. 行動評価:リーダーシップとチーム貢献</h2>
430
+ <div class="overflow-x-auto rounded-lg border border-gray-200">
431
+ <table class="min-w-full divide-y divide-gray-200 report-table">
432
+ <thead>
433
+ <tr>
434
+ <th class="w-1/5">評価項目</th>
435
+ <th class="w-2/5">自己評価(発揮できた具体的な事例)</th>
436
+ <th class="w-2/5">評価者コメント(改善点と成長の可能性)</th>
437
+ </tr>
438
+ </thead>
439
+ <tbody>
440
+ <tr>
441
+ <td>**リーダーシップ・影響力**</td>
442
+ <td>信越化学新規事業戦略策定プロジェクトの終盤でチームの士気が低下した際、自発的にチームミーティングを企画し、残りのタスクを再分配することで、チームを再結集させた。</td>
443
+ <td class="bg-blue-50/50">個人的なタスク遂行能力の高さから、ときにチームメンバーのフォローを待たずに単独で進めてしまう傾向が見られた。今後は、仕事を「任せる(委譲する)」スキルを意識的に磨き、チーム全体の生産性を向上させてほしい。</td>
444
+ </tr>
445
+ <tr>
446
+ <td>**チームワーク・協調性**</td>
447
+ <td>新任のアソシエイトからの質問に常に快く答え、タスクが遅延しそうなメンバーに対しては、期日前に声をかけてサポートを提供した。</td>
448
+ <td>チーム内での人望が厚く、ポジティブな職場環境づくりに貢献している。</td>
449
+ </tr>
450
+ <tr>
451
+ <td>**実行力・責任感**</td>
452
+ <td>期間を通じて、担当タスクの納期遅延やミスの発生はゼロ。クライアントへの提出物については、常にレビュー期限より1日早く準備を完了させた。</td>
453
+ <td>計画的で極めて責任感が強い。自身のタスク管理については完璧。次期は、プロジェクト全体の進捗リスクを先読みし、評価者に報告する頻度を増やしてほしい。</td>
454
+ </tr>
455
+ </tbody>
456
+ </table>
457
+ </div>
458
+ <div class="text-right pt-4">
459
+ <span class="font-bold text-xl text-gray-700">【総合評価(行動)】</span>
460
+ <span class="text-3xl font-extrabold ml-2 score bg-green-600">A</span>
461
+ </div>
462
+ </section>
463
+
464
+ <!-- 5. 総括とキャリア開発 -->
465
+ <section class="space-y-6 pt-6 border-t border-gray-200">
466
+ <h2 class="section-header">5. 総括とキャリア開発</h2>
467
+
468
+ <!-- 5-1. 総評 -->
469
+ <div class="space-y-4 p-5 rounded-xl border border-indigo-200 bg-indigo-50 shadow-md">
470
+ <h3 class="text-xl font-bold text-indigo-700">5-1. 総評(評価者記入欄)</h3>
471
+
472
+ <!-- Kudos -->
473
+ <div class="space-y-2">
474
+ <p class="font-semibold text-gray-700 border-b pb-1">期間中の最も優れていた点(Kudos):</p>
475
+ <div class="p-3 bg-white rounded-lg border border-gray-200 text-gray-800">
476
+ <p>田中さんは、期間を通じて極めて高い分析力と責任感を発揮し、特にプロジェクトAでは目標を上回る成果に決定的に貢献しました。シミュレーションモデルの正確性と、期限厳守の姿勢は、ファームの信頼を高めています。次の職位(マネージャー)への昇進に必要な問題解決能力と専門知識は完全に満たしていると評価します。</p>
477
+ </div>
478
+ </div>
479
+
480
+ <!-- Focus Area -->
481
+ <div class="space-y-2">
482
+ <p class="font-semibold text-gray-700 border-b pb-1">成長のための主要な改善点(Focus Area):</p>
483
+ <div class="p-4 bg-red-100 rounded-lg border-2 border-red-300 font-medium text-red-800">
484
+ <p>次期は、単なるタスク遂行者から**「プロジェクトのオーナー」へと意識をシフトする必要があります。特に、クライアントやチームに対して、明確な方向性を提示するファシリテーション力と、自らのタスクを適切に任せて成果を出す「委譲と育成」のリーダーシップ**を重点的に強化してください。</p>
485
+ </div>
486
+ </div>
487
+ </div>
488
+
489
+ <!-- 5-2. 今後の目標とネクストステップ -->
490
+ <div class="space-y-4 pt-4">
491
+ <h3 class="text-xl font-bold text-indigo-700 border-b pb-1">5-2. 今後の目標とネクストステップ</h3>
492
+ <div class="overflow-x-auto rounded-lg border border-gray-200">
493
+ <table class="min-w-full divide-y divide-gray-200 report-table">
494
+ <thead>
495
+ <tr>
496
+ <th class="w-1/5">項目</th>
497
+ <th class="w-2/5">目標設定(次期に重点的に取り組むこと)</th>
498
+ <th class="w-2/5">サポート・トレーニング計画</th>
499
+ </tr>
500
+ </thead>
501
+ <tbody>
502
+ <tr>
503
+ <td>**専門性向上**</td>
504
+ <td>M&A後のPMI(Post Merger Integration)に関する専門知識とケーススタディを習得し、関連プロジェクトに参画する。</td>
505
+ <td class="bg-gray-50/50">外部M&A専門家によるトレーニングプログラム(全3回)への参加。プロジェクトB'のPMIフェーズへのアサインメント。</td>
506
+ </tr>
507
+ <tr>
508
+ <td>**キャリアゴール**</td>
509
+ <td>評価期間内にマネージャーへのプロモーションを目指す。そのために、チームメンバー2名に対し、デリバラブル作成に関するメンタリングを最低3ヶ月実施する。</td>
510
+ <td class="bg-gray-50/50">佐藤(評価者)による月次の1on1ミー��ィングを設定し、委譲と育成の進捗をレビューする。シニアマネージャーが主催するリーダーシップ・ワークショップへの招待。</td>
511
+ </tr>
512
+ </tbody>
513
+ </table>
514
+ </div>
515
+ </div>
516
+ </section>
517
+
518
+ <!-- 6. 最終承認 -->
519
+ <section class="pt-8 border-t border-gray-200">
520
+ <h2 class="section-header">6. 最終承認</h2>
521
+ <div class="grid grid-cols-1 sm:grid-cols-2 gap-x-10 gap-y-6 text-center">
522
+
523
+ <div class="border-2 border-gray-400 p-6 rounded-xl bg-white shadow-inner space-y-3">
524
+ <p class="text-lg text-gray-500 font-medium border-b pb-2">被評価者 署名</p>
525
+ <p class="text-2xl font-extrabold text-gray-900">[田中 太郎]</p>
526
+ <p class="text-sm text-gray-500 mt-2">日付: 2025年4月20日</p>
527
+ </div>
528
+
529
+ <div class="border-2 border-gray-400 p-6 rounded-xl bg-white shadow-inner space-y-3">
530
+ <p class="text-lg text-gray-500 font-medium border-b pb-2">評価者 署名</p>
531
+ <p class="text-2xl font-extrabold text-gray-900">[佐藤 花子]</p>
532
+ <p class="text-sm text-gray-500 mt-2">日付: 2025年4月20日</p>
533
+ </div>
534
+
535
+ </div>
536
+ </section>
537
+
538
+ <footer class="text-center text-sm text-gray-400 pt-6 border-t mt-8">
539
+ <p>機密文書 - [ファーム名] Confidential Document</p>
540
+ </footer>
541
+
542
+ </div>
543
+ </body>
544
+ </html>
545
+ """)
546
+
547
+ gr.Markdown(
548
+ """
549
+ # 🔖 パフォーマンス評価
550
+ コンサルタントのパフォーマンスを評価します。
551
+ """
552
+ )
553
+ # Input component for the user's question
554
+ user_input = gr.Textbox(
555
+ label="パフォーマンス:",
556
+ info="コンサルタントのパフォーマンス評価を入力してください。",
557
+ lines=10
558
+ )
559
+
560
+ # Output component to display the model's response
561
+ output_text = gr.HTML(
562
+ label="パフォーマンス評価:",
563
+ value='<div>結果</div>'
564
+ )
565
+
566
+ output_html = gr.File(
567
+ label="パフォーマンス評価ファイル"
568
+ )
569
+ # Button to trigger the API call
570
+ submit_button = gr.Button("生成", visible=False)
571
+
572
+ user_input.change(fn=change_input, inputs=[user_input], outputs=[submit_button])
573
+
574
+ # Connect the components: when the button is clicked,
575
+ # the generate_response function is called with the user_input,
576
+ # and the result is displayed in the output_text box.
577
+ submit_button.click(
578
+ fn=generate_response,
579
+ inputs=user_input,
580
+ outputs=[output_text, output_html]
581
+ )
582
+
583
+ # Launch the Gradio app
584
+ if __name__ == "__main__":
585
+ gsearch.launch(favicon_path="path.ico")