File size: 393 Bytes
e8d9d4a
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr
import subprocess

def train_model():
    try:
        subprocess.run(["python", "train.py"], check=True)
        return "✅ Training finished and model pushed to Hugging Face Hub!"
    except subprocess.CalledProcessError as e:
        return f"❌ Training failed: {e}"

gr.Interface(fn=train_model, inputs=[], outputs="text", title="LoRA Fine-tune (ZeroGPU)").launch()