Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import subprocess
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
# Instalar git-lfs
|
| 6 |
+
subprocess.run(["apt-get", "update"])
|
| 7 |
+
subprocess.run(["apt-get", "install", "-y", "git-lfs"])
|
| 8 |
+
|
| 9 |
+
# Inicializar git-lfs
|
| 10 |
+
subprocess.run(["git", "lfs", "install"])
|
| 11 |
+
|
| 12 |
+
# Clonar o reposit贸rio
|
| 13 |
+
repo_url = "https://huggingface.co/spaces/Gyufyjk/Voice-Clone"
|
| 14 |
+
subprocess.run(["git", "clone", repo_url])
|
| 15 |
+
|
| 16 |
+
# Mudar para o diret贸rio clonado
|
| 17 |
+
os.chdir("Voice-Clone")
|
| 18 |
+
|
| 19 |
+
# Instalar depend锚ncias
|
| 20 |
+
subprocess.run(["pip", "install", "-r", "requirements.txt"])
|
| 21 |
+
|
| 22 |
+
# C贸digo adicional para seu aplicativo
|
| 23 |
+
def main_function(inputs):
|
| 24 |
+
# Implementa莽茫o da sua fun莽茫o principal
|
| 25 |
+
return "Resultados aqui"
|
| 26 |
+
|
| 27 |
+
# Interface Gradio
|
| 28 |
+
iface = gr.Interface(
|
| 29 |
+
fn=main_function,
|
| 30 |
+
inputs="text",
|
| 31 |
+
outputs="text"
|
| 32 |
+
)
|
| 33 |
+
|
| 34 |
+
iface.launch()
|