Gladiator commited on
Commit
efe6085
1 Parent(s): ab86fa9

add some usage instruction and fix youtube video embed issue

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -31,7 +31,8 @@ def embed_video(title: str):
31
  match = re.search(r"v=([-\w]+)", video_url)
32
  video_id = match.group(1)
33
  # embed video
34
- video_embed = f"<iframe width='560' height='315' src=https://www.youtube.com/embed/{video_id} frameborder='0' allowfullscreen></iframe>"
 
35
 
36
  return video_embed
37
 
@@ -90,7 +91,17 @@ def get_answer(podcast: str, question: str):
90
 
91
 
92
  with gr.Blocks() as demo:
93
- gr.Markdown("# Welcome to Gradient Dissent QA Bot!")
 
 
 
 
 
 
 
 
 
 
94
 
95
  with gr.Row():
96
  with gr.Column(scale=0.5):
 
31
  match = re.search(r"v=([-\w]+)", video_url)
32
  video_id = match.group(1)
33
  # embed video
34
+ # video_embed = f"<iframe width='600' height='330' src=https://www.youtube.com/embed/{video_id} frameborder='0' allowfullscreen></iframe>"
35
+ video_embed = f"<iframe width='580' height='360' src=https://www.youtube.com/embed/{video_id} frameborder='0' allowfullscreen style='width:100%; max-width:100%;'></iframe>"
36
 
37
  return video_embed
38
 
 
91
 
92
 
93
  with gr.Blocks() as demo:
94
+ # gr.Markdown("# Welcome to Gradient Dissent QA Bot!")
95
+ gr.Markdown("<h1><center>Welcome to Gradient Dissent QA Bot 🤖</center></h1>")
96
+ gr.Markdown(
97
+ "#### The purpose of this QA bot is to provide answers to questions related to podcast episodes from Weights & Biases' [Gradient Dissent Podcast](https://www.youtube.com/playlist?list=PLD80i8An1OEEb1jP0sjEyiLG8ULRXFob_)."
98
+ )
99
+ gr.Markdown(
100
+ "#### First select a podcast episode and click `Get Podcast Info` to get the summary and possible questions about the podcast episode."
101
+ )
102
+ gr.Markdown(
103
+ "#### Then ask a question about the podcast episode and click `Get Answer` to get the answer."
104
+ )
105
 
106
  with gr.Row():
107
  with gr.Column(scale=0.5):