Create app.py
Browse files
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()
|