Skip to content

Commit

Permalink
Update: Add searching in webui
Browse files Browse the repository at this point in the history
  • Loading branch information
Artrajz committed Jul 19, 2024
1 parent 53925de commit eba46df
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tts_app/static/css/plugins/select2-bootstrap-5-theme.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tts_app/static/css/plugins/select2.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tts_app/static/js/plugins/select2.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tts_app/templates/pages/gpt_sovits.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,5 @@
</div>


</div>
</div>
<!-- [ GPT-SoVITS ] end -->
22 changes: 20 additions & 2 deletions tts_app/templates/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/fileinput.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/pages/index.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/plugins/select2.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/plugins/select2-bootstrap-5-theme.min.css') }}">
</head>
<body>
<main class="main-container">
Expand Down Expand Up @@ -43,7 +45,8 @@ <h1 class="w-100">
{% block gpt_sovits %}
{% include 'pages/gpt_sovits.html' %}
{% endblock gpt_sovits %}

</div>
<div>
<div class="mt-2">
{% if speakers_count == 0 %}
<div style="color: red;">未加载任何模型</div>
Expand All @@ -57,7 +60,8 @@ <h1 class="w-100">
</div>
<div>
<label>API调用:</label>
<a id="vits_link" href="https://artrajz-vits-simple-api.hf.space/voice/vits?text=你好,こんにちは&id=164"
<a id="vits_link"
href="https://artrajz-vits-simple-api.hf.space/voice/vits?text=你好,こんにちは&id=164"
style="text-decoration: none; color: black">
https://artrajz-vits-simple-api.hf.space/voice/vits?text=你好,こんにちは&id=164
</a>
Expand Down Expand Up @@ -92,5 +96,19 @@ <h1 class="w-100">

<script src="{{ url_for('static', filename='js/index.js') }}"></script>
<script src="{{ url_for('static', filename='js/plugins/fileinput.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/plugins/select2.min.js') }}"></script>

<script>
$(document).ready(function () {
$('.input_id').select2({
theme: 'bootstrap-5',
});

$('.input_preset').select2({
theme: 'bootstrap-5',
});
});
</script>

</body>
</html>

0 comments on commit eba46df

Please sign in to comment.