sugakrit6 commited on
Commit
00f245f
·
verified ·
1 Parent(s): 3e32b60

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import zipfile
3
+ import os
4
+
5
+ def train_rvc(dataset_zip):
6
+ # Extract dataset
7
+ with zipfile.ZipFile(dataset_zip, 'r') as zip_ref:
8
+ zip_ref.extractall("dataset")
9
+
10
+ # Here you would call your actual RVC training code
11
+ # Example placeholder:
12
+ os.system("python train.py --dataset dataset")
13
+
14
+ return "Training started!"
15
+
16
+ ui = gr.Interface(
17
+ fn=train_rvc,
18
+ inputs=gr.File(label="Upload dataset.zip"),
19
+ outputs="text",
20
+ title="RVC Trainer"
21
+ )
22
+
23
+ ui.launch()