MilesCranmer commited on
Commit
967d63f
1 Parent(s): 985f8fa

Disable refresh animation in plots

Browse files
Files changed (3) hide show
  1. gui/app.py +7 -5
  2. gui/plots.py +1 -1
  3. gui/processing.py +1 -2
gui/app.py CHANGED
@@ -1,8 +1,7 @@
1
  import gradio as gr
2
-
3
- from .data import test_equations
4
- from .plots import replot, replot_pareto
5
- from .processing import processing
6
 
7
 
8
  def _data_layout():
@@ -234,13 +233,16 @@ def main():
234
  blocks["data_seed"],
235
  ]
236
  for eqn_component in eqn_components:
237
- eqn_component.change(replot, eqn_components, blocks["example_plot"])
 
 
238
 
239
  # Update plot when dataframe is updated:
240
  blocks["df"].change(
241
  replot_pareto,
242
  inputs=[blocks["df"], blocks["maxsize"]],
243
  outputs=[blocks["pareto"]],
 
244
  )
245
  demo.load(replot, eqn_components, blocks["example_plot"])
246
 
 
1
  import gradio as gr
2
+ from data import test_equations
3
+ from plots import replot, replot_pareto
4
+ from processing import processing
 
5
 
6
 
7
  def _data_layout():
 
233
  blocks["data_seed"],
234
  ]
235
  for eqn_component in eqn_components:
236
+ eqn_component.change(
237
+ replot, eqn_components, blocks["example_plot"], show_progress=False
238
+ )
239
 
240
  # Update plot when dataframe is updated:
241
  blocks["df"].change(
242
  replot_pareto,
243
  inputs=[blocks["df"], blocks["maxsize"]],
244
  outputs=[blocks["pareto"]],
245
+ show_progress=False,
246
  )
247
  demo.load(replot, eqn_components, blocks["example_plot"])
248
 
gui/plots.py CHANGED
@@ -11,7 +11,7 @@ plt.rcParams["font.family"] = [
11
  "monospace",
12
  ]
13
 
14
- from .data import generate_data
15
 
16
 
17
  def replot_pareto(df: pd.DataFrame, maxsize: int):
 
11
  "monospace",
12
  ]
13
 
14
+ from data import generate_data
15
 
16
 
17
  def replot_pareto(df: pd.DataFrame, maxsize: int):
gui/processing.py CHANGED
@@ -6,8 +6,7 @@ from pathlib import Path
6
 
7
  import numpy as np
8
  import pandas as pd
9
-
10
- from .data import generate_data, read_csv
11
 
12
  EMPTY_DF = lambda: pd.DataFrame(
13
  {
 
6
 
7
  import numpy as np
8
  import pandas as pd
9
+ from data import generate_data, read_csv
 
10
 
11
  EMPTY_DF = lambda: pd.DataFrame(
12
  {