From 0aadeabccc3ae2f94ac83a45ded56bfa548e6ee6 Mon Sep 17 00:00:00 2001 From: Rongkang Xiong Date: Tue, 27 Jun 2023 10:05:36 +0800 Subject: [PATCH] add baidu stats --- main.py | 5 +++++ sites/baidu_stats.html | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 sites/baidu_stats.html diff --git a/main.py b/main.py index 15a058f..cd65ecd 100644 --- a/main.py +++ b/main.py @@ -52,7 +52,12 @@ def main(): CHATBOT_HEIGHT /= 2 cancel_handles = [] + # Read your Baidu statistics code from the file + baidu_stats_code = Path('./sites/baidu_stats.html').read_text() with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled=False, css=advanced_css) as demo: + # Insert your Baidu statistics code here + gr.HTML(baidu_stats_code) + # Insert Title gr.HTML(title_html) cookies = gr.State({'api_key': API_KEY, 'llm_model': LLM_MODEL}) with gr_L1(): diff --git a/sites/baidu_stats.html b/sites/baidu_stats.html new file mode 100644 index 0000000..b60d10f --- /dev/null +++ b/sites/baidu_stats.html @@ -0,0 +1,10 @@ + + \ No newline at end of file