TAneKAnz commited on
Commit
c415cfb
1 Parent(s): bb90a83
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -40,10 +40,6 @@ def convert_to_grayscale(video_file, history):
40
 
41
  return output_file, history
42
 
43
- def get_history(history):
44
- history_html = "<br>".join(history)
45
- return history_html
46
-
47
  with gr.Blocks() as demo:
48
  history_state = gr.State([])
49
 
@@ -62,9 +58,11 @@ with gr.Blocks() as demo:
62
  with gr.Tab("History") as history_tab:
63
  history_output = gr.HTML(label="History")
64
 
65
- def update_history(history):
66
- return get_history(history)
67
-
68
- convert_button.click(fn=update_history, inputs=history_state, outputs=history_output)
 
 
69
 
70
  demo.launch()
 
40
 
41
  return output_file, history
42
 
 
 
 
 
43
  with gr.Blocks() as demo:
44
  history_state = gr.State([])
45
 
 
58
  with gr.Tab("History") as history_tab:
59
  history_output = gr.HTML(label="History")
60
 
61
+ history_output.change(
62
+ fn=lambda history: "<pre>" + "\n".join(history) + "</pre>",
63
+ inputs=history_state,
64
+ outputs=history_output,
65
+ queue=False
66
+ )
67
 
68
  demo.launch()