geqintan commited on
Commit
de7b8b9
·
1 Parent(s): 1bed37b
.gitattributes CHANGED
@@ -1,6 +1,3 @@
1
- .env filter=tpl
2
- __pycache__/
3
- .DS_Store
4
  *.7z filter=lfs diff=lfs merge=lfs -text
5
  *.arrow filter=lfs diff=lfs merge=lfs -text
6
  *.bin filter=lfs diff=lfs merge=lfs -text
 
 
 
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
.gitignore CHANGED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ .env
2
+ __pycache__/
3
+ .DS_Store
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.9
5
+
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
+ ENV PATH="/home/user/.local/bin:$PATH"
9
+
10
+ WORKDIR /app
11
+
12
+ COPY --chown=user ./requirements.txt requirements.txt
13
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
+
15
+ COPY --chown=user . /app
16
+ CMD ["adk", "web", "--port", "7860"]
agent1/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from agent1 import agent
agent1/agent.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from google.adk.agents import Agent
2
+ from google.adk.tools import google_search
3
+
4
+ root_agent = Agent(
5
+ name="新闻资讯助手",
6
+ model="gemini-2.0-flash-exp",
7
+ instruction="查询并回答用户关于最新新闻的问题",
8
+ tools=[google_search], # 内置搜索工具
9
+ description="基于Google搜索的新闻助手"
10
+ )
agent2/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from agent2 import agent
agent2/agent.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from google.adk.agents import Agent
2
+ from google.adk.tools import google_search
3
+
4
+ root_agent = Agent(
5
+ name="新闻资讯助手",
6
+ model="gemini-2.0-flash-exp",
7
+ instruction="查询并回答用户关于最新新闻的问题",
8
+ tools=[google_search], # 内置搜索工具
9
+ description="基于Google搜索的新闻助手"
10
+ )
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ google-adk