Spaces:
Running
Running
调整样式
Browse files
main.py
CHANGED
@@ -29,8 +29,12 @@ crazy_functional = get_crazy_functionals()
|
|
29 |
# 处理markdown文本格式的转变
|
30 |
gr.Chatbot.postprocess = format_io
|
31 |
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
|
35 |
with gr.Blocks(theme=set_theme, analytics_enabled=False) as demo:
|
36 |
gr.HTML(title_html)
|
|
|
29 |
# 处理markdown文本格式的转变
|
30 |
gr.Chatbot.postprocess = format_io
|
31 |
|
32 |
+
# 做一些样式上的调整
|
33 |
+
try: set_theme = gr.themes.Default( primary_hue=gr.themes.utils.colors.orange,
|
34 |
+
font=["ui-sans-serif", "system-ui", "sans-serif", gr.themes.utils.fonts.GoogleFont("Source Sans Pro")],
|
35 |
+
font_mono=["ui-monospace", "Consolas", "monospace", gr.themes.utils.fonts.GoogleFont("IBM Plex Mono")])
|
36 |
+
except:
|
37 |
+
set_theme = None; print('gradio 版本老旧,不能自定义字体和颜色')
|
38 |
|
39 |
with gr.Blocks(theme=set_theme, analytics_enabled=False) as demo:
|
40 |
gr.HTML(title_html)
|