NightPrince commited on
Commit
e8d9d4a
·
verified ·
1 Parent(s): 6d47ef5

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import subprocess
3
+
4
+ def train_model():
5
+ try:
6
+ subprocess.run(["python", "train.py"], check=True)
7
+ return "✅ Training finished and model pushed to Hugging Face Hub!"
8
+ except subprocess.CalledProcessError as e:
9
+ return f"❌ Training failed: {e}"
10
+
11
+ gr.Interface(fn=train_model, inputs=[], outputs="text", title="LoRA Fine-tune (ZeroGPU)").launch()