mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
commit
485c88d468
@ -1,4 +1,4 @@
|
|||||||
from flask import Flask, request, Markup, abort, jsonify
|
from flask import Flask, request, Markup, abort, jsonify, send_from_directory
|
||||||
from flask_cors import CORS
|
from flask_cors import CORS
|
||||||
import logging
|
import logging
|
||||||
from logging.config import dictConfig
|
from logging.config import dictConfig
|
||||||
@ -37,7 +37,18 @@ dictConfig({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
app = Flask(__name__, static_folder="../frontend/dist", static_url_path='/')
|
|
||||||
|
#app = Flask(__name__, static_folder="../frontend/dist", static_url_path='/')
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
@app.route("/<path:path>")
|
||||||
|
def static_dir(path):
|
||||||
|
return send_from_directory("../frontend/dist", path)
|
||||||
|
|
||||||
|
@app.route('/', methods=['GET'])
|
||||||
|
def redirect_to_index():
|
||||||
|
return send_from_directory("../frontend/dist", 'index.html')
|
||||||
|
|
||||||
CORS(app, resources={r"/*": {"origins": "*"}})
|
CORS(app, resources={r"/*": {"origins": "*"}})
|
||||||
|
|
||||||
class VoiceChanger():
|
class VoiceChanger():
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# 参考:https://programwiz.org/2022/03/22/how-to-write-shell-script-for-option-parsing/
|
# 参考:https://programwiz.org/2022/03/22/how-to-write-shell-script-for-option-parsing/
|
||||||
|
|
||||||
DOCKER_IMAGE=dannadori/voice-changer:20220902_113334
|
DOCKER_IMAGE=dannadori/voice-changer:20220902_120553
|
||||||
TENSORBOARD_PORT=6006
|
TENSORBOARD_PORT=6006
|
||||||
VOICE_CHANGER_PORT=8080
|
VOICE_CHANGER_PORT=8080
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM dannadori/voice-changer-internal:20220902_113223 as front
|
FROM dannadori/voice-changer-internal:20220902_120454 as front
|
||||||
FROM debian:bullseye-slim as base
|
FROM debian:bullseye-slim as base
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
Loading…
Reference in New Issue
Block a user