Spaces:
Sleeping
Sleeping
upload: app.py
Browse files
app.py
CHANGED
|
@@ -208,7 +208,10 @@ def build_gradio_ui() -> gr.Blocks:
|
|
| 208 |
"level3": "Lv.3(画像あり・最高精度)",
|
| 209 |
}.get(new_level, new_level)
|
| 210 |
|
| 211 |
-
history = history + [
|
|
|
|
|
|
|
|
|
|
| 212 |
|
| 213 |
# Clear context after first send (already stored in session)
|
| 214 |
new_ctx = {}
|
|
@@ -262,7 +265,7 @@ def build_gradio_ui() -> gr.Blocks:
|
|
| 262 |
"level3": "Lv.3(画像あり・最高精度)",
|
| 263 |
}.get(new_level, new_level)
|
| 264 |
|
| 265 |
-
initial_history = [
|
| 266 |
|
| 267 |
return (
|
| 268 |
initial_history,
|
|
|
|
| 208 |
"level3": "Lv.3(画像あり・最高精度)",
|
| 209 |
}.get(new_level, new_level)
|
| 210 |
|
| 211 |
+
history = history + [
|
| 212 |
+
{"role": "user", "content": message or "(画像を送信)"},
|
| 213 |
+
{"role": "assistant", "content": response_text},
|
| 214 |
+
]
|
| 215 |
|
| 216 |
# Clear context after first send (already stored in session)
|
| 217 |
new_ctx = {}
|
|
|
|
| 265 |
"level3": "Lv.3(画像あり・最高精度)",
|
| 266 |
}.get(new_level, new_level)
|
| 267 |
|
| 268 |
+
initial_history = [{"role": "assistant", "content": response_text}]
|
| 269 |
|
| 270 |
return (
|
| 271 |
initial_history,
|