gyrojeff commited on
Commit
0d214da
1 Parent(s): 91088d2

feat: add intro ui

Browse files
Files changed (1) hide show
  1. demo.py +20 -0
demo.py CHANGED
@@ -197,8 +197,28 @@ def generate_grid(num_columns, num_rows):
197
  return ret_images, ret_labels
198
 
199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  with gr.Blocks() as demo:
201
  with gr.Column():
 
202
  with gr.Row():
203
  inp = gr.Image(type="pil", label="Input Image")
204
  out = gr.Label(num_top_classes=9, label="Output Font")
 
197
  return ret_images, ret_labels
198
 
199
 
200
+ # fmt: off
201
+ intro = \
202
+ """
203
+ <div align="center">
204
+ <h1>✨ Font Recognition 字体检测 ✨</h1>
205
+ </div>
206
+
207
+ Project page 项目地址: [https://github.com/JeffersonQin/YuzuMarker.FontDetection](https://github.com/JeffersonQin/YuzuMarker.FontDetection)
208
+
209
+ Upload an image to detect the font used in the image. Please make sure the text occupies most of the image area to achieve higher recognition accuracy.
210
+
211
+ 上传图片以检测字体,尽量使得图片中的文字占据图片的大部分区域以获得更高的识别准确率。
212
+
213
+ Click "Run" to start the demo after uploading an image.
214
+
215
+ 上传完成之后点击“Run”开始识别。
216
+ """
217
+ # fmt: on
218
+
219
  with gr.Blocks() as demo:
220
  with gr.Column():
221
+ intro = gr.Markdown(intro)
222
  with gr.Row():
223
  inp = gr.Image(type="pil", label="Input Image")
224
  out = gr.Label(num_top_classes=9, label="Output Font")