Spaces:
Runtime error
Runtime error
finished
Browse files
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 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
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()
|