Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import sys
|
| 3 |
import os
|
|
@@ -55,17 +56,12 @@ else:
|
|
| 55 |
my_applio = "ParityError/Interstellar"
|
| 56 |
|
| 57 |
with gr.Blocks(theme=my_applio, title="Applio") as Applio:
|
| 58 |
-
gr.Markdown("#
|
| 59 |
gr.Markdown(
|
| 60 |
i18n(
|
| 61 |
"Ultimate voice cloning tool, meticulously optimized for unrivaled power, modularity, and user-friendly experience."
|
| 62 |
)
|
| 63 |
)
|
| 64 |
-
gr.Markdown(
|
| 65 |
-
i18n(
|
| 66 |
-
"[Support](https://discord.gg/IAHispano) — [Discord Bot](https://discord.com/oauth2/authorize?client_id=1144714449563955302&permissions=1376674695271&scope=bot%20applications.commands) — [Find Voices](https://applio.org/models) — [GitHub](https://github.com/IAHispano/Applio)"
|
| 67 |
-
)
|
| 68 |
-
)
|
| 69 |
with gr.Tab(i18n("Inference")):
|
| 70 |
inference_tab()
|
| 71 |
|
|
@@ -109,33 +105,9 @@ with gr.Blocks(theme=my_applio, title="Applio") as Applio:
|
|
| 109 |
restart_tab()
|
| 110 |
|
| 111 |
|
| 112 |
-
def launch_gradio(
|
| 113 |
-
Applio.launch(
|
| 114 |
-
favicon_path="assets/ICON.ico",
|
| 115 |
-
share="--share" in sys.argv,
|
| 116 |
-
inbrowser="--open" in sys.argv,
|
| 117 |
-
server_port=port,
|
| 118 |
-
)
|
| 119 |
|
| 120 |
|
| 121 |
if __name__ == "__main__":
|
| 122 |
-
|
| 123 |
-
if "--port" in sys.argv:
|
| 124 |
-
port_index = sys.argv.index("--port") + 1
|
| 125 |
-
if port_index < len(sys.argv):
|
| 126 |
-
port = int(sys.argv[port_index])
|
| 127 |
-
|
| 128 |
-
launch_gradio(port)
|
| 129 |
-
|
| 130 |
-
else:
|
| 131 |
-
# if launch fails, decrement port number and try again (up to 10 times)
|
| 132 |
-
for i in range(10):
|
| 133 |
-
try:
|
| 134 |
-
launch_gradio(port)
|
| 135 |
-
break
|
| 136 |
-
except OSError:
|
| 137 |
-
print("Failed to launch on port", port, "- trying again...")
|
| 138 |
-
port -= 1
|
| 139 |
-
except Exception as error:
|
| 140 |
-
print(f"An error occurred launching Gradio: {error}")
|
| 141 |
-
break
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import gradio as gr
|
| 3 |
import sys
|
| 4 |
import os
|
|
|
|
| 56 |
my_applio = "ParityError/Interstellar"
|
| 57 |
|
| 58 |
with gr.Blocks(theme=my_applio, title="Applio") as Applio:
|
| 59 |
+
gr.Markdown("# Magnata Music")
|
| 60 |
gr.Markdown(
|
| 61 |
i18n(
|
| 62 |
"Ultimate voice cloning tool, meticulously optimized for unrivaled power, modularity, and user-friendly experience."
|
| 63 |
)
|
| 64 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
with gr.Tab(i18n("Inference")):
|
| 66 |
inference_tab()
|
| 67 |
|
|
|
|
| 105 |
restart_tab()
|
| 106 |
|
| 107 |
|
| 108 |
+
def launch_gradio():
|
| 109 |
+
Applio.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
|
| 112 |
if __name__ == "__main__":
|
| 113 |
+
launch_gradio()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|