mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
flask index
This commit is contained in:
parent
414e654544
commit
de5fc89024
@ -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
|
||||
import logging
|
||||
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": "*"}})
|
||||
|
||||
class VoiceChanger():
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# 参考: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
|
||||
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
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
Loading…
Reference in New Issue
Block a user