File size: 2,373 Bytes
ef59294
 
 
a04ab39
 
ef59294
a04ab39
ef59294
a04ab39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ae1190c
 
 
a04ab39
ae1190c
da793a0
 
11e5927
 
ae1190c
 
a04ab39
 
 
 
 
 
 
 
 
ef59294
 
a04ab39
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from flask import Flask, request, jsonify, render_template_string
from flask_cors import CORS

app = Flask(__name__)
CORS(app)

@app.route('/')
def tts():
    return render_template_string("""
        <!DOCTYPE html>
        <html>
        <head>
            <title>TTS API Documentation</title>
            <style>
                .container {
                    padding: 20px;
                    max-width: 1200px;
                    margin: 0 auto;
                }
                .text-content {
                    background-color: #f5f5f5;
                    padding: 15px;
                    border-radius: 5px;
                    margin-bottom: 20px;
                }
                .iframe-container {
                    width: 100%;
                    height: 80vh;
                }
            </style>
        </head>
        <body>
            <div class="container">
                <div class="text-content">
                    <h1>BangDream-少女歌剧在线TTS平台</h1>
                    <p>重要通知:因Huggingface空间资源限制,服务可能随时暂停</p>
                    <p>公告 [2025.2.16]</p>
                    <ul>
                        <li>受Huggingface免费容器1GB存储空间限制,目前仅存一个备份站点仍在运行,随时可能中断</li>
                        <li>您可以通过以下方式获取本地部署版本:
                           <br>百度网盘链接:<a href="https://pan.baidu.com/s/1JdiloKwtH9WwL9jULvZ81w?pwd=cy18" target="_blank" style="color: #0066cc;">点击下载</a> (提取码:cy18)</li>
                        <li>整合包下载连接:
                           <br>百度网盘链接:<a href="https://pan.baidu.com/s/14Ulb0-RctZcAlU6taAoHkQ?pwd=ec5h" target="_blank" style="color: #0066cc;">点击下载</a> (提取码:ec5h)</li>
                        <li>本地部署及网页重建讨论群:
                           <br>QQ群:641423968</li>
                    </ul>
                </div>
                <div class="iframe-container">
                    <iframe src="https://mahiruoshi-mygo-vits-bert.hf.space" style="width:100%; height:100%; border:none;"></iframe>
                </div>
            </div>
        </body>
        </html>
    """)

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=7860, debug=True)