| import gradio as gr | |
| import zipfile | |
| import os | |
| def train_rvc(dataset_zip): | |
| # Extract dataset | |
| with zipfile.ZipFile(dataset_zip, 'r') as zip_ref: | |
| zip_ref.extractall("dataset") | |
| # Here you would call your actual RVC training code | |
| # Example placeholder: | |
| os.system("python train.py --dataset dataset") | |
| return "Training started!" | |
| ui = gr.Interface( | |
| fn=train_rvc, | |
| inputs=gr.File(label="Upload dataset.zip"), | |
| outputs="text", | |
| title="RVC Trainer" | |
| ) | |
| ui.launch() | |