Commit ·
10a9dd9
1
Parent(s): 2548633
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,7 @@ import commons
|
|
| 8 |
import soundfile as sf
|
| 9 |
from models import SynthesizerTrn
|
| 10 |
from text import text_to_sequence, _clean_text
|
|
|
|
| 11 |
|
| 12 |
# limit text and audio length in huggingface spaces
|
| 13 |
limitation = os.getenv("SYSTEM") == "spaces"
|
|
@@ -91,6 +92,10 @@ def resultAud():
|
|
| 91 |
if __name__ == "__main__":
|
| 92 |
parser = argparse.ArgumentParser()
|
| 93 |
parser.add_argument('--device', type=str, default='cpu')
|
|
|
|
| 94 |
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
| 95 |
deviceType(args.device)
|
| 96 |
app.run(debug=True, port=80)
|
|
|
|
| 8 |
import soundfile as sf
|
| 9 |
from models import SynthesizerTrn
|
| 10 |
from text import text_to_sequence, _clean_text
|
| 11 |
+
from pyngrok import ngrok
|
| 12 |
|
| 13 |
# limit text and audio length in huggingface spaces
|
| 14 |
limitation = os.getenv("SYSTEM") == "spaces"
|
|
|
|
| 92 |
if __name__ == "__main__":
|
| 93 |
parser = argparse.ArgumentParser()
|
| 94 |
parser.add_argument('--device', type=str, default='cpu')
|
| 95 |
+
parser.add_argument('--auth', type=str, action="store_true", default=False, help="auth for ngrok")
|
| 96 |
args = parser.parse_args()
|
| 97 |
+
ngrok.set_auth_token(args.device)
|
| 98 |
+
public_url = ngrok.connect(80).public_url
|
| 99 |
+
print("Monggo: " + public_url)
|
| 100 |
deviceType(args.device)
|
| 101 |
app.run(debug=True, port=80)
|