Renecto commited on
Commit
6e1c017
·
verified ·
1 Parent(s): a41633a

upload: app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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 + [[message or "(画像を送信)", response_text]]
 
 
 
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 = [[None, response_text]]
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,