| 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() | |