pquintero commited on
Commit
1a2d1c6
·
1 Parent(s): 21b403e

dynamically update download msg

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -135,7 +135,7 @@ with gr.Blocks() as demo:
135
  label="Submission Type",
136
  )
137
  download_button = gr.DownloadButton(
138
- label="📥 Download example submission CSV",
139
  value=EXAMPLE_FILE_DICT["GDPa1"],
140
  variant="secondary",
141
  )
@@ -157,11 +157,14 @@ with gr.Blocks() as demo:
157
  download_file = EXAMPLE_FILE_DICT.get(
158
  submission_type, EXAMPLE_FILE_DICT["GDPa1"]
159
  )
 
 
 
160
  return (
161
  submission_type,
162
  download_file,
163
  gr.DownloadButton(
164
- label="📥 Download example submission CSV",
165
  value=download_file,
166
  variant="secondary",
167
  ),
 
135
  label="Submission Type",
136
  )
137
  download_button = gr.DownloadButton(
138
+ label="📥 Download example submission CSV for GDPa1",
139
  value=EXAMPLE_FILE_DICT["GDPa1"],
140
  variant="secondary",
141
  )
 
157
  download_file = EXAMPLE_FILE_DICT.get(
158
  submission_type, EXAMPLE_FILE_DICT["GDPa1"]
159
  )
160
+ download_message = (
161
+ f"📥 Download example submission CSV for {submission_type}"
162
+ )
163
  return (
164
  submission_type,
165
  download_file,
166
  gr.DownloadButton(
167
+ label=download_message,
168
  value=download_file,
169
  variant="secondary",
170
  ),