tschm commited on
Commit
5202999
·
1 Parent(s): 5146d64

disabled button

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -57,12 +57,17 @@ def __output(create, dropdown, event, mo, name):
57
  # print(img)
58
  data = BytesIO(img)
59
 
 
 
 
 
60
  # Create a download button for the Plotly graph
61
  download_btn = mo.download(
62
  data=data,
63
  filename=f"{name.value}_{event.value}_plot.png",
64
  label="Download",
65
  mimetype="image/png",
 
66
  )
67
 
68
  # Display the plot and download button
 
57
  # print(img)
58
  data = BytesIO(img)
59
 
60
+ disabled = True
61
+ if dropdown.value and event.value and name.value:
62
+ disabled = False
63
+
64
  # Create a download button for the Plotly graph
65
  download_btn = mo.download(
66
  data=data,
67
  filename=f"{name.value}_{event.value}_plot.png",
68
  label="Download",
69
  mimetype="image/png",
70
+ disabled=disabled,
71
  )
72
 
73
  # Display the plot and download button