fudii0921 commited on
Commit
62e0532
·
verified ·
1 Parent(s): 242a462

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -550,13 +550,13 @@ def change_input(prompt):
550
 
551
 
552
  # --- Python function for the Gradio app ---
553
- def generate_response(prompt, kijun):
554
  """
555
  This function takes a user's prompt, calls the Gemini API
556
  with the performance evaluation tool, and returns the response text.
557
  """
558
  try:
559
- final_prompt = prompt + f'{kijyun}に基づいて{prompt}に記載されているコンサルタントのパフォーマンスをプロジェクト毎に分けて評価してください。必ず、評価者の総合評価を詳しく記載してください。答えは{template}に合わせてHTML形式にしてください'
560
  response = client.models.generate_content(
561
  model="gemini-2.5-flash",
562
  contents=final_prompt,
@@ -583,7 +583,7 @@ with gr.Blocks(title="Gemini API with Performance Review") as gsearch:
583
  gr.HTML('<div id="header"><span>🔖 パフォーマンス評価</span><img id="logo" src="https://www.ryhintl.com/images/ryhlogo/ryhlogo.png" width="64" height="64" alt="Logo"></div>')
584
 
585
  with gr.Sidebar(open=False):
586
- kijun = gr.Textbox(label="御社の評価基準", value="""
587
  1. イントロダクションと全体像の確認 (Introduction and Overview)
588
  役割対象質問・論点目的評価者「この評価レポートの意図は、過去を裁くことではなく、今後の成長を最大化することです。
589
  まず、レポートの全体的な評価について、あなたの最初の感想を教えてください。」建設的な雰囲気を作り、自己評価と他者評価のギャップを認識させる。評価者「期間を通じて、あなたが設定していた最も重要な目標は何でしたか?その目標達成について、自己評価はどの程度ですか?」評価の焦点を合わせ、本人の認識を明確にする。
@@ -657,7 +657,7 @@ with gr.Blocks(title="Gemini API with Performance Review") as gsearch:
657
  # and the result is displayed in the output_text box.
658
  submit_button.click(
659
  fn=generate_response,
660
- inputs=[user_input,kijun],
661
  outputs=[output_text, output_html]
662
  )
663
 
 
550
 
551
 
552
  # --- Python function for the Gradio app ---
553
+ def generate_response(prompt):
554
  """
555
  This function takes a user's prompt, calls the Gemini API
556
  with the performance evaluation tool, and returns the response text.
557
  """
558
  try:
559
+ final_prompt = prompt + f'{eval_kijyun}に基づいて{prompt}に記載されているコンサルタントのパフォーマンスをプロジェクト毎に分けて評価してください。必ず、評価者の総合評価を詳しく記載してください。答えは{template}に合わせてHTML形式にしてください'
560
  response = client.models.generate_content(
561
  model="gemini-2.5-flash",
562
  contents=final_prompt,
 
583
  gr.HTML('<div id="header"><span>🔖 パフォーマンス評価</span><img id="logo" src="https://www.ryhintl.com/images/ryhlogo/ryhlogo.png" width="64" height="64" alt="Logo"></div>')
584
 
585
  with gr.Sidebar(open=False):
586
+ gr.Textbox(label="御社の評価基準", value="""
587
  1. イントロダクションと全体像の確認 (Introduction and Overview)
588
  役割対象質問・論点目的評価者「この評価レポートの意図は、過去を裁くことではなく、今後の成長を最大化することです。
589
  まず、レポートの全体的な評価について、あなたの最初の感想を教えてください。」建設的な雰囲気を作り、自己評価と他者評価のギャップを認識させる。評価者「期間を通じて、あなたが設定していた最も重要な目標は何でしたか?その目標達成について、自己評価はどの程度ですか?」評価の焦点を合わせ、本人の認識を明確にする。
 
657
  # and the result is displayed in the output_text box.
658
  submit_button.click(
659
  fn=generate_response,
660
+ inputs=user_input,
661
  outputs=[output_text, output_html]
662
  )
663