cocoat commited on
Commit
bbb33ee
·
verified ·
1 Parent(s): 9de478b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -54,6 +54,10 @@ def make_html_table(caption):
54
  # html += '</table>'
55
  return html
56
 
 
 
 
 
57
  def infer(prompt, neg, seed, rand, w, h, cfg, steps, scheduler_type,
58
  progress=gr.Progress(track_tqdm=True)):
59
  if rand:
@@ -287,6 +291,10 @@ window.addEventListener('load', () => {
287
  fn=infer,
288
  inputs=[prompt, neg, seed_sl, rand, width, height, cfg, steps, scheduler_type],
289
  outputs=[img_out, history_gallery]
 
 
 
 
290
  )
291
 
292
  # ページロード時に history から初期表示
 
54
  # html += '</table>'
55
  return html
56
 
57
+ def update_history(img, gallery_items):
58
+ # tables_html を作って返す
59
+ return tables_html
60
+
61
  def infer(prompt, neg, seed, rand, w, h, cfg, steps, scheduler_type,
62
  progress=gr.Progress(track_tqdm=True)):
63
  if rand:
 
291
  fn=infer,
292
  inputs=[prompt, neg, seed_sl, rand, width, height, cfg, steps, scheduler_type],
293
  outputs=[img_out, history_gallery]
294
+ ).then(
295
+ fn=update_history,
296
+ inputs=[img_out, history_gallery],
297
+ outputs=[history_tables]
298
  )
299
 
300
  # ページロード時に history から初期表示