Spaces:
Sleeping
Sleeping
fix
Browse files- app.py +15 -0
- requirements.txt +21 -0
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import subprocess
|
3 |
+
|
4 |
+
repo_url = "https://github.com/SocialAI-tianji/Tianji.git"
|
5 |
+
clone_dir = "Tianji"
|
6 |
+
|
7 |
+
print("正在克隆 Tianji 仓库...")
|
8 |
+
subprocess.run(["git", "clone", repo_url], check=True)
|
9 |
+
|
10 |
+
print("正在安装依赖...")
|
11 |
+
os.chdir(clone_dir)
|
12 |
+
subprocess.run(["pip", "install", "-e", "."], check=True)
|
13 |
+
|
14 |
+
print("正在运行示例...")
|
15 |
+
subprocess.run(["python", "run/demo_prompt.py"], check=True)
|
requirements.txt
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
python-dotenv
|
2 |
+
modelscope
|
3 |
+
tiktoken
|
4 |
+
einops
|
5 |
+
loguru
|
6 |
+
bitsandbytes
|
7 |
+
duckduckgo_search==5.3.1b1
|
8 |
+
beautifulsoup4==4.12.3
|
9 |
+
gradio
|
10 |
+
streamlit
|
11 |
+
streamlit_chat
|
12 |
+
zhipuai
|
13 |
+
|
14 |
+
# for agent
|
15 |
+
# metagpt==0.8.1 # 注意, metagpt 安装可能会导致 llamaindex 及 langchian 版本改变
|
16 |
+
|
17 |
+
# for rag
|
18 |
+
langchain==0.2.15
|
19 |
+
langchain_community==0.2.14
|
20 |
+
langchain_chroma
|
21 |
+
sentence-transformers
|