Spaces:
Runtime error
Runtime error
feat: load title from DEMO.md
Browse files
app.py
CHANGED
|
@@ -201,9 +201,12 @@ def update_example(language):
|
|
| 201 |
],
|
| 202 |
)
|
| 203 |
|
|
|
|
|
|
|
|
|
|
| 204 |
|
| 205 |
demo = gr.Blocks(
|
| 206 |
-
title=
|
| 207 |
css="@import url(https://tauhu.tw/tauhu-oo.css);",
|
| 208 |
theme=gr.themes.Default(
|
| 209 |
font=(
|
|
|
|
| 201 |
],
|
| 202 |
)
|
| 203 |
|
| 204 |
+
def get_title():
|
| 205 |
+
with open("DEMO.md") as tong:
|
| 206 |
+
return tong.readline().strip('# ')
|
| 207 |
|
| 208 |
demo = gr.Blocks(
|
| 209 |
+
title=get_title(),
|
| 210 |
css="@import url(https://tauhu.tw/tauhu-oo.css);",
|
| 211 |
theme=gr.themes.Default(
|
| 212 |
font=(
|