taprosoft commited on
Commit
6fa7314
·
unverified ·
1 Parent(s): a85c16a

feat: add CSS font

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -6,6 +6,10 @@ import gradio as gr
6
  from matplotlib import pyplot as plt
7
  import pandas as pd
8
 
 
 
 
 
9
 
10
  def normalize_spaces(text):
11
  return '\n'.join(re.sub(r" {2,}", " ", line) for line in text.split('\n'))
@@ -118,6 +122,7 @@ with gr.Blocks(
118
  theme=gr.themes.Ocean(
119
  font_mono="PT Mono",
120
  ),
 
121
  ) as demo:
122
  gr.Markdown(
123
  "# 2D Layout-Preserving Text Benchmark\n"
 
6
  from matplotlib import pyplot as plt
7
  import pandas as pd
8
 
9
+ HEAD_HTML = """
10
+ <link href='https://fonts.googleapis.com/css?family=PT Mono' rel='stylesheet'>
11
+ """
12
+
13
 
14
  def normalize_spaces(text):
15
  return '\n'.join(re.sub(r" {2,}", " ", line) for line in text.split('\n'))
 
122
  theme=gr.themes.Ocean(
123
  font_mono="PT Mono",
124
  ),
125
+ head=HEAD_HTML,
126
  ) as demo:
127
  gr.Markdown(
128
  "# 2D Layout-Preserving Text Benchmark\n"