Spaces:
Paused
Paused
Update app.py
Browse files
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, # より低い温度を設定
|