mahika123 commited on
Commit
b91a459
·
verified ·
1 Parent(s): 28dee1a
Files changed (1) hide show
  1. app.py +16 -5
app.py CHANGED
@@ -147,11 +147,11 @@ def resource_block(career):
147
  link_html += f'<li><strong>{label}</strong>: <a href="{url}" target="_blank">{url}</a></li>'
148
  link_html += "</ul>"
149
 
150
- video_iframe = f"""
151
- <iframe width="560" height="315" src="{content['video']}"
152
- title="YouTube video player" frameborder="0" allow="accelerometer; autoplay;
153
- clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
154
- """
155
 
156
  return link_html, video_iframe
157
 
@@ -197,4 +197,15 @@ with gr.Blocks(theme=theme, css=custom_css) as chatbot:
197
  "Statisticians",
198
  "Biomedical Engineer"
199
  ],
 
 
 
 
 
 
 
 
 
 
 
200
 
 
147
  link_html += f'<li><strong>{label}</strong>: <a href="{url}" target="_blank">{url}</a></li>'
148
  link_html += "</ul>"
149
 
150
+ video_iframe = (
151
+ f'<iframe width="560" height="315" src="{content["video"]}" '
152
+ 'title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; '
153
+ 'clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>'
154
+ )
155
 
156
  return link_html, video_iframe
157
 
 
197
  "Statisticians",
198
  "Biomedical Engineer"
199
  ],
200
+ label="Choose a Career"
201
+ )
202
+ output_links = gr.HTML()
203
+ output_video = gr.HTML()
204
+ dropdown_resources.change(
205
+ fn=resource_block,
206
+ inputs=dropdown_resources,
207
+ outputs=[output_links, output_video]
208
+ )
209
+
210
+ chatbot.launch()
211