fix colab runtime error
parent
1397010773
commit
74f1f6e148
|
@ -18,7 +18,6 @@ from control.mkgui.base import Opyrator
|
|||
from control.mkgui.base.core import name_to_title
|
||||
from . import schema_utils
|
||||
from .streamlit_utils import CUSTOM_STREAMLIT_CSS
|
||||
from pyngrok import ngrok
|
||||
|
||||
STREAMLIT_RUNNER_SNIPPET = """
|
||||
from control.mkgui.base.ui import render_streamlit_ui
|
||||
|
@ -60,10 +59,7 @@ def launch_ui(port: int = 8501) -> None:
|
|||
f"""{python_path} "{sys.executable}" -m streamlit run --server.port={port} --server.headless=True --runner.magicEnabled=False --server.maxUploadSize=50 --browser.gatherUsageStats=False {f.name}""",
|
||||
shell=True,
|
||||
)
|
||||
# Setup a tunnel to the streamlit port 2023
|
||||
|
||||
public_url = ngrok.connect(port="2023")
|
||||
print(public_url)
|
||||
|
||||
f.close()
|
||||
unlink(f.name)
|
||||
|
||||
|
|
5
run.py
5
run.py
|
@ -15,6 +15,7 @@ from models.encoder import inference as speacker_encoder
|
|||
from models.vocoder.hifigan import inference as vocoder
|
||||
from models.ppg2mel import MelDecoderMOLv2
|
||||
from utils.f0_utils import compute_f0, f02lf0, compute_mean_std, get_converted_lf0uv
|
||||
from pyngrok import ngrok
|
||||
|
||||
|
||||
def _build_ppg2mel_model(model_config, model_file, device):
|
||||
|
@ -136,6 +137,10 @@ def main():
|
|||
parser = get_parser()
|
||||
args = parser.parse_args()
|
||||
convert(args)
|
||||
# Setup a tunnel to the streamlit port 2023
|
||||
|
||||
public_url = ngrok.connect(port="2023")
|
||||
print(public_url)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue