Amit Kumar commited on
Commit
7b6c7f6
Β·
1 Parent(s): 888c965

changed layout

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -9,10 +9,12 @@ DESCRIPTION_FILE = "about/description.md"
9
  def load_leaderboard():
10
  return pd.read_csv(LEADERBOARD_FILE)
11
 
12
- with open(DESCRIPTION_FILE, "r") as f:
13
- md_text = f.read()
14
-
15
- html_description = markdown.markdown(md_text, extensions=["tables"])
 
 
16
  columns_fixed = ["Model Name", "Average Label", "Average Record"]
17
 
18
  df = load_leaderboard()
@@ -51,7 +53,7 @@ def filter_leaderboard(selected_params, selected_shots, selected_data):
51
  return filtered[cols_to_show]
52
 
53
  with gr.Blocks() as demo:
54
- gr.Markdown("<h1 style='text-align: center;'>πŸ† Medical Classification Leaderboard - Beta</h1>")
55
  gr.Image("./about/linguist.png", elem_id="linguist-image", show_label=False)
56
 
57
  # Add CSS to restrict the size of the image
@@ -64,7 +66,7 @@ with gr.Blocks() as demo:
64
  }
65
  """
66
 
67
- gr.HTML(html_description)
68
 
69
 
70
  with gr.Row():
 
9
  def load_leaderboard():
10
  return pd.read_csv(LEADERBOARD_FILE)
11
 
12
+ def load_description(DESCRIPTION_FILE):
13
+ # Read the markdown file and convert it to HTML
14
+ with open(DESCRIPTION_FILE, "r") as f:
15
+ md_text = f.read()
16
+ html_description = markdown.markdown(md_text, extensions=["tables"])
17
+ return html_description
18
  columns_fixed = ["Model Name", "Average Label", "Average Record"]
19
 
20
  df = load_leaderboard()
 
53
  return filtered[cols_to_show]
54
 
55
  with gr.Blocks() as demo:
56
+ gr.HTML("<h1 style='text-align: center;'>πŸ† Medical Classification Leaderboard - Beta</h1>")
57
  gr.Image("./about/linguist.png", elem_id="linguist-image", show_label=False)
58
 
59
  # Add CSS to restrict the size of the image
 
66
  }
67
  """
68
 
69
+ gr.HTML(load_description(DESCRIPTION_FILE))
70
 
71
 
72
  with gr.Row():