mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-22 22:34:25 -07:00
Adds favicon
This commit is contained in:
parent
3e8401be22
commit
f8ebd83e05
3 changed files with 29 additions and 32 deletions
|
@ -5,7 +5,7 @@ from flask_socketio import SocketIO, emit
|
||||||
|
|
||||||
|
|
||||||
def create_flask_app(s2c, c2s, s2flask, args):
|
def create_flask_app(s2c, c2s, s2flask, args):
|
||||||
app = Flask(__name__, template_folder="templates")
|
app = Flask(__name__, template_folder="templates", static_folder="static")
|
||||||
model_path = Path(args.get('model_path', ''))
|
model_path = Path(args.get('model_path', ''))
|
||||||
filename = 'preview.jpg'
|
filename = 'preview.jpg'
|
||||||
preview_file = str(model_path / filename)
|
preview_file = str(model_path / filename)
|
||||||
|
|
BIN
flaskr/static/favicon.ico
Normal file
BIN
flaskr/static/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 284 KiB |
|
@ -1,43 +1,40 @@
|
||||||
<head>
|
<head>
|
||||||
<!-- <link rel="stylesheet"-->
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"
|
||||||
<!-- href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"-->
|
|
||||||
<!-- integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"-->
|
|
||||||
<!-- crossorigin="anonymous">-->
|
|
||||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
|
|
||||||
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
|
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js"
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js"
|
||||||
integrity="sha256-yr4fRk/GU1ehYJPAs8P4JlTgu0Hdsp4ZKrx8bDEDC3I="
|
integrity="sha256-yr4fRk/GU1ehYJPAs8P4JlTgu0Hdsp4ZKrx8bDEDC3I="
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
<title>Flask Server Demonstration</title>
|
<title>Flask Server Demonstration</title>
|
||||||
|
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$('button#save').click(function() {
|
$('button#save').click(function() {
|
||||||
$.post("{{ url_for('save') }}");
|
$.post("{{ url_for('save') }}");
|
||||||
});
|
|
||||||
|
|
||||||
$('button#exit').click(function() {
|
|
||||||
$.post("{{ url_for('exit') }}");
|
|
||||||
});
|
|
||||||
|
|
||||||
$('button#update').click(function() {
|
|
||||||
$.post("{{ url_for('update') }}");
|
|
||||||
});
|
|
||||||
|
|
||||||
$('button#next_preview').click(function() {
|
|
||||||
$.post("{{ url_for('next_preview') }}");
|
|
||||||
});
|
|
||||||
|
|
||||||
$('button#change_history_range').click(function() {
|
|
||||||
$.post("{{ url_for('change_history_range') }}");
|
|
||||||
});
|
|
||||||
|
|
||||||
const socket = io.connect('http://' + document.domain + ':' + location.port);
|
|
||||||
socket.on('preview', function(msg) {
|
|
||||||
console.log(new Date(), '- new preview -', msg);
|
|
||||||
$('img#preview').attr("src", "{{ url_for('preview_image') }}?q=" + new Date().getTime());
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('button#exit').click(function() {
|
||||||
|
$.post("{{ url_for('exit') }}");
|
||||||
|
});
|
||||||
|
|
||||||
|
$('button#update').click(function() {
|
||||||
|
$.post("{{ url_for('update') }}");
|
||||||
|
});
|
||||||
|
|
||||||
|
$('button#next_preview').click(function() {
|
||||||
|
$.post("{{ url_for('next_preview') }}");
|
||||||
|
});
|
||||||
|
|
||||||
|
$('button#change_history_range').click(function() {
|
||||||
|
$.post("{{ url_for('change_history_range') }}");
|
||||||
|
});
|
||||||
|
|
||||||
|
const socket = io.connect('http://' + document.domain + ':' + location.port);
|
||||||
|
socket.on('preview', function(msg) {
|
||||||
|
console.log(new Date(), '- new preview -', msg);
|
||||||
|
$('img#preview').attr("src", "{{ url_for('preview_image') }}?q=" + new Date().getTime());
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue