chenjianfei commited on
Commit
73512c3
·
1 Parent(s): c9b65c9
Files changed (3) hide show
  1. Dockerfile +20 -0
  2. app.py +1 -1
  3. tts_api.py +1 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 基于官方 Python 镜像
2
+ FROM python:3.10-slim
3
+
4
+ # 安装系统工具(可选)
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ git \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # 设置工作目录
10
+ WORKDIR /app
11
+
12
+ # 复制 requirements.txt 并安装依赖
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # 复制全部代码到容器
17
+ COPY . .
18
+
19
+ # 定义启动命令(根据你的应用调整)
20
+ CMD ["python", "app.py"]
app.py CHANGED
@@ -519,5 +519,5 @@ if __name__ == "__main__":
519
  inputs=section_state,
520
  outputs=chat_history_select)
521
  print("===== 初始化完成 =====")
522
- demo.launch(share=True)
523
 
 
519
  inputs=section_state,
520
  outputs=chat_history_select)
521
  print("===== 初始化完成 =====")
522
+ demo.launch(share=False)
523
 
tts_api.py CHANGED
@@ -10,6 +10,7 @@ DEMO_EXAMPLES = [
10
  ["太乙真人.wav", "对,这就是我万人敬仰的太乙真人,虽然有点婴儿肥,但也掩不住我逼人的帅气。"],
11
  ["邓紫棋.wav", "特别大的不同,因为以前在香港是过年的时候,我们可能见到的亲戚都是爸爸那边的亲戚"],
12
  ["雷军.wav", "这是个好问题,我把来龙去脉给你简单讲,就是这个社会对小米有很多的误解,有很多的误解,呃,也能理解啊,就是小米这个模式呢"],
 
13
  ["Taylor Swift.wav", "It's actually uh, it's a concept record, but it's my first directly autobiographical album in a while because the last album that I put out was, uh, a rework."]
14
  ]
15
  class TTSapi:
 
10
  ["太乙真人.wav", "对,这就是我万人敬仰的太乙真人,虽然有点婴儿肥,但也掩不住我逼人的帅气。"],
11
  ["邓紫棋.wav", "特别大的不同,因为以前在香港是过年的时候,我们可能见到的亲戚都是爸爸那边的亲戚"],
12
  ["雷军.wav", "这是个好问题,我把来龙去脉给你简单讲,就是这个社会对小米有很多的误解,有很多的误解,呃,也能理解啊,就是小米这个模式呢"],
13
+ ["周杰伦.wav", "但如果你这兴趣可以得到很大的回响,那会更开心"],
14
  ["Taylor Swift.wav", "It's actually uh, it's a concept record, but it's my first directly autobiographical album in a while because the last album that I put out was, uh, a rework."]
15
  ]
16
  class TTSapi: