戒酒的李白

Reinitialize.

1 -<div align="center">  
2 -  
3 - <!-- # 📊 Weibo Public Opinion Analysis System -->  
4 -  
5 - <img src="https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/blob/main/static/image/logo_compressed.png" alt="Weibo Public Opinion Analysis System Logo" width="800">  
6 -  
7 - [![GitHub Stars](https://img.shields.io/github/stars/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/stargazers)  
8 - [![GitHub Forks](https://img.shields.io/github/forks/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/network)  
9 - [![GitHub Issues](https://img.shields.io/github/issues/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/issues)  
10 - [![GitHub Contributors](https://img.shields.io/github/contributors/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/graphs/contributors)  
11 - [![GitHub License](https://img.shields.io/github/license/666ghj/Weibo_PublicOpinion_AnalysisSystem?style=flat-square)](https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/blob/main/LICENSE)  
12 -  
13 -</div>  
14 -  
15 -<div align="center">  
16 -<img src="https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem/blob/main/static/image/banner_compressed.png" alt="banner" width="800">  
17 -</div>  
18 -  
19 - ### **[Important Announcement] Refactoring Plan for Weibo_PublicOpinion_AnalysisSystem**  
20 -  
21 -Dear all contributors, users, and followers,  
22 -  
23 -Hello everyone,  
24 -  
25 -I am the initiator and main developer of this project. First and foremost, I want to personally thank you for your continued attention, contributions, and enthusiasm for the `Weibo_PublicOpinion_AnalysisSystem` project.  
26 -  
27 -Over the past period, as the project has expanded, I have noticed several challenges that require attention:  
28 -  
29 -1. **Architectural and Module Issues:** Through rapid iteration, many modules have been integrated. However, a lack of unified top-level design has led to some module conflicts and a need for structural optimization.  
30 -2. **High Barrier to Entry:** A significant current challenge is that users need to configure their own crawlers and scrape data from scratch. This makes the deployment and startup process relatively complex, creating an inconvenience for many new users.  
31 -3. **Development and Presentation Limitations:** The development progress of various functional modules has been uneven. Additionally, the existing dashboard paradigm has limitations in compatibility and scalability that hinder my future development goals.  
32 -4. **Constraints of the Self-Trained Model:** Considering its size and maintenance costs, the previously trained model has become a constraint on the project's long-term development.  
33 -  
34 -After a careful evaluation of these points, and in light of current technological trends (especially in LLMs, and Agents), I have decided to initiate a **comprehensive, bottom-up architectural refactoring** of the project, with the goal of providing a more user-friendly tool for everyone.  
35 -  
36 -**My next update plan will focus on:**  
37 -  
38 -1. **Optimizing the Core Architecture:** I will be moving away from the current dashboard-centric presentation to design a more lightweight and flexible system framework.  
39 -2. **Focusing on Core Competencies:** The new architecture will refocus my efforts on the crawling, processing, and in-depth analysis of Weibo data, aiming to build a stable and efficient data core.  
40 -3. **Integrating Advanced Large Language Models (LLMs):** I plan to discontinue maintenance of the self-trained model and will instead utilize APIs to call mainstream large language models for analysis tasks, enhancing the system's analytical capabilities and flexibility.  
41 -4. **The Ultimate Goal: A New Model of "Deployable Core + Online Service":**  
42 - - **For Developers:** I aim to refine the project into a **"minimal, user-friendly, low-cost, modular"** public opinion analysis **core engine** to facilitate secondary development and private deployment.  
43 - - **For General Users:** Leveraging the new architecture, I **plan to introduce a new "Online Service" version, designed to address the challenges of deployment and data acquisition.**  
44 - - **Providing a Shared Database:** I will begin building and maintaining a **continuously updated, shared database**. This will allow users to access our data source directly, **removing the need to configure and run their own crawlers.**  
45 - - **Simplifying the User Experience:** This will eliminate the need for a complex local setup, enabling a **click-to-use** experience.  
46 - - **Retaining Personalized Analysis:** Users will still be able to configure their own LLM API keys in the online service to perform personalized, in-depth analysis with our data core.  
47 -  
48 -This refactoring is a necessary step in our development. I understand this will require adjusting and, in some cases, rewriting code to which many of you have contributed. However, for the long-term health of the project and to make it accessible to a broader audience, I believe this step is essential.  
49 -  
50 -In the coming weeks, I will begin to outline the new project blueprint and will keep the community updated on my progress. I value your wisdom and support now more than ever.  
51 -  
52 -Thank you once again for your understanding and support! Let's look forward to the next evolution of `Weibo_PublicOpinion_AnalysisSystem`.  
53 -  
54 -Sincerely,  
55 -  
56 -Project Initiator  
@@ -5,15 +5,21 @@ @@ -5,15 +5,21 @@
5 """ 5 """
6 6
7 # MySQL数据库配置 7 # MySQL数据库配置
8 -DB_HOST = "" 8 +DB_HOST = "rm-2zeib6b13f6tt9kncoo.mysql.rds.aliyuncs.com"
9 DB_PORT = 3306 9 DB_PORT = 3306
10 -DB_USER = ""  
11 -DB_PASSWORD = ""  
12 -DB_NAME = ""  
13 -DB_CHARSET = "" 10 +DB_USER = "root"
  11 +DB_PASSWORD = "mneDccc7sHHANtFk"
  12 +DB_NAME = "media_crawler"
  13 +DB_CHARSET = "utf8mb4"
14 14
15 -# DeepSeek API密钥  
16 -DEEPSEEK_API_KEY = "" 15 +# agent1 DeepSeek API密钥
  16 +DEEPSEEK_API_KEY = "sk-4bbc57fadd234666a3840f1a7edc1f2e"
  17 +
  18 +# agent2 DeepSeek API密钥
  19 +DEEPSEEK_API_KEY_2 = "sk-b26405d2e02f475c960d21c2acce61e7"
17 20
18 # Tavily搜索API密钥 21 # Tavily搜索API密钥
19 -TAVILY_API_KEY = "" 22 +TAVILY_API_KEY = "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"
  23 +
  24 +# 博查Web Search API密钥
  25 +BOCHA_Web_Search_API_KEY = "sk-496b37a2a1ee4915b438dd822b03de8d"
  1 +# 多Agent舆情分析协作系统依赖包
  2 +
  3 +# 核心依赖
  4 +streamlit>=1.28.0
  5 +requests>=2.31.0
  6 +python-dotenv>=1.0.0
  7 +
  8 +# LLM接口
  9 +openai>=1.3.0
  10 +deepseek-ai>=0.1.0
  11 +
  12 +# 搜索API
  13 +tavily-python>=0.3.0
  14 +
  15 +# 数据处理
  16 +pandas>=2.0.0
  17 +numpy>=1.24.0
  18 +
  19 +# 可视化
  20 +plotly>=5.17.0
  21 +
  22 +# 工具库
  23 +python-dateutil>=2.8.2
  24 +uuid>=1.30
  25 +
  26 +# 博查API相关
  27 +# 注意:博查API使用标准的HTTP请求,不需要额外的包
  28 +
  29 +# 开发工具
  30 +pytest>=7.4.0
  31 +black>=23.0.0
  32 +flake8>=6.0.0
@@ -13,7 +13,7 @@ import json @@ -13,7 +13,7 @@ import json
13 sys.path.insert(0, os.path.join(os.path.dirname(__file__), '.')) 13 sys.path.insert(0, os.path.join(os.path.dirname(__file__), '.'))
14 14
15 from src import DeepSearchAgent, Config 15 from src import DeepSearchAgent, Config
16 -from config import DEEPSEEK_API_KEY, TAVILY_API_KEY 16 +from config import DEEPSEEK_API_KEY, DEEPSEEK_API_KEY_2, TAVILY_API_KEY
17 17
18 18
19 def main(): 19 def main():
@@ -31,18 +31,6 @@ def main(): @@ -31,18 +31,6 @@ def main():
31 with st.sidebar: 31 with st.sidebar:
32 st.header("配置") 32 st.header("配置")
33 33
34 - # 显示当前API密钥状态  
35 - st.subheader("API密钥状态")  
36 - if DEEPSEEK_API_KEY:  
37 - st.success("DeepSeek API Key: 已配置")  
38 - else:  
39 - st.error("DeepSeek API Key: 未配置")  
40 -  
41 - if TAVILY_API_KEY:  
42 - st.success("Tavily API Key: 已配置")  
43 - else:  
44 - st.error("Tavily API Key: 未配置")  
45 -  
46 # 高级配置 34 # 高级配置
47 st.subheader("高级配置") 35 st.subheader("高级配置")
48 max_reflections = st.slider("反思次数", 1, 5, 2) 36 max_reflections = st.slider("反思次数", 1, 5, 2)
@@ -105,23 +93,19 @@ def main(): @@ -105,23 +93,19 @@ def main():
105 st.error("请输入研究查询") 93 st.error("请输入研究查询")
106 return 94 return
107 95
108 - if not DEEPSEEK_API_KEY and llm_provider == "deepseek":  
109 - st.error("请在config.py中配置DeepSeek API Key")  
110 - return  
111 -  
112 - if not TAVILY_API_KEY:  
113 - st.error("请在config.py中配置Tavily API Key")  
114 - return  
115 -  
116 if llm_provider == "openai" and not openai_key: 96 if llm_provider == "openai" and not openai_key:
117 st.error("请提供OpenAI API Key") 97 st.error("请提供OpenAI API Key")
118 return 98 return
119 99
  100 + # 自动使用配置文件中的API密钥
  101 + deepseek_key = DEEPSEEK_API_KEY
  102 + tavily_key = TAVILY_API_KEY
  103 +
120 # 创建配置 104 # 创建配置
121 config = Config( 105 config = Config(
122 - deepseek_api_key=DEEPSEEK_API_KEY if llm_provider == "deepseek" else None, 106 + deepseek_api_key=deepseek_key if llm_provider == "deepseek" else None,
123 openai_api_key=openai_key if llm_provider == "openai" else None, 107 openai_api_key=openai_key if llm_provider == "openai" else None,
124 - tavily_api_key=TAVILY_API_KEY, 108 + tavily_api_key=tavily_key,
125 default_llm_provider=llm_provider, 109 default_llm_provider=llm_provider,
126 deepseek_model=model_name if llm_provider == "deepseek" else "deepseek-chat", 110 deepseek_model=model_name if llm_provider == "deepseek" else "deepseek-chat",
127 openai_model=model_name if llm_provider == "openai" else "gpt-4o-mini", 111 openai_model=model_name if llm_provider == "openai" else "gpt-4o-mini",
  1 +# 武汉大学图书馆性骚扰指控事件分析报告
  2 +
  3 +## 概述
  4 +
  5 +2023年武汉大学图书馆性骚扰指控事件引发广泛社会关注。事件始于2023年7月,武大研究生杨景媛在网络上举报本科生肖明滔在图书馆自习时实施性骚扰行为。校方随后对肖明滔作出纪律处分,但杨景媛不满处理结果,于2024年6月向法院提起诉讼。2025年7月25日,法院一审判决认为证据不足以认定性骚扰,驳回杨景媛全部诉求。判决后舆论持续发酵,网民质疑杨景媛涉嫌诬告和学术不端,同时批评校方最初处分决定。武汉大学于8月1日成立工作专班,宣布对涉事双方的纪律处分和学位论文进行全面调查复核。该事件折射出中国高校舆情管理、性别议题和网络举报机制面临的复杂挑战。近年来,师德师风、校园冲突等事件频繁成为舆论热议话题,暴露出高校在舆情危机管理中流程透明度不足、处理机制不完善的问题。面对舆情,校方回应往往滞后或模糊,如仅以“等上级指示”应对,反映出治理能力缺陷和系统性失灵。网络举报处理流程缺乏标准化,易引发二次舆情发酵,需加强制度建设与公众沟通。从2023年10月13日武汉大学发布的处理通报可以看出,该校对涉及学生的网上举报采取了调查核实机制,但在具体执行中仍存在改进空间。2025年7月31日,校长张平文对媒体回应法院驳回事件,显示校方在舆情管理上逐步加强对外沟通,但整体机制仍需完善,特别是在校园性骚扰事件处理流程和高校网络举报制度方面需要更系统化的规范。
  6 +
  7 +## 详细分析
  8 +
  9 +2023年10月,武汉大学发生的“图书馆事件”引发了广泛网络舆情。事件源于女生杨景媛在图书馆自习时指控男生肖某某实施“隔空性骚扰”,并拍摄5段视频要求其写下道歉信,随后将事件公开至网络,引发超10万浏览量。事件初期舆论焦点集中在对涉事学生的道德谴责,校方虽在48小时内迅速作出“记过”处分回应,但通报仅称“存在不雅行为,有损大学生形象”,未公开具体调查流程和行为定性依据,校方相关负责人承认该处分系为“给舆情降温”的应急处理措施。这种“既处理又不说明”的模糊态度引发公众质疑。舆情持续发酵导致当事人肖某某遭遇“开盒”式人肉搜索,私人信息被曝光,照片被制成花圈、遗像,不仅遭受同学孤立和网络暴力,更于10月17日被确诊为急性精神应激障碍(后确诊为创伤后应激障碍PTSD,自杀倾向达80%)。后经医学专家论证,肖某某动作符合特应性皮炎抓挠特征,法院最终认定不构成性骚扰。2024年7月25日,法院一审宣判驳回杨景媛全部诉讼请求,但校方未撤销对肖某某的处分决定。这一事件反映出高校舆情管理中回应透明度不足、重舆轻法的程序瑕疵与网络暴力治理的双重挑战,凸显了高校在危机公关中行政手段替代事实调查的治理困境。
  10 +
  11 +## 结论
  12 +
  13 +武汉大学图书馆性骚扰指控事件不仅是一起校园纠纷,更暴露了中国高校在舆情管理、性别议题处理和网络举报机制方面的系统性缺陷。事件发展过程中,校方初期的应急处分缺乏透明度,后续又未能及时根据法院判决调整处理决定,反映出行政干预替代事实调查的治理困境。同时,网络暴力的蔓延和对当事人造成的严重身心伤害警示我们需加强网络行为规范与心理健康支持。未来,高校应建立更透明的调查与回应机制,完善网络举报标准化流程,并在舆情管理中平衡法律程序与公众沟通,以避免类似事件的再次发生。
This diff could not be displayed because it is too large.