tomo2chin2 commited on
Commit
9a4687f
·
verified ·
1 Parent(s): 87b3a98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -151,6 +151,12 @@ def generate_html_from_text(text, temperature=0.3):
151
  # HuggingFaceデータセットからシステムインストラクションを読み込む
152
  system_instruction = load_system_instruction()
153
 
 
 
 
 
 
 
154
  # 生成設定 - ばらつきを減らすために設定を調整
155
  generation_config = {
156
  "temperature": temperature, # より低い温度を設定
 
151
  # HuggingFaceデータセットからシステムインストラクションを読み込む
152
  system_instruction = load_system_instruction()
153
 
154
+ # モデル初期化
155
+ logger.info(f"Gemini APIにリクエストを送信: テキスト長さ = {len(text)}, 温度 = {temperature}")
156
+
157
+ # モデル初期化
158
+ model = genai.GenerativeModel(model_name)
159
+
160
  # 生成設定 - ばらつきを減らすために設定を調整
161
  generation_config = {
162
  "temperature": temperature, # より低い温度を設定