File size: 569 Bytes
bce314a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
import subprocess

def run_training():
    # Execute train.py and capture its output
    result = subprocess.run(["python", "train.py"], capture_output=True, text=True)
    return result.stdout + "\n" + result.stderr

# Create a Gradio interface with no inputs and a text output for logs
iface = gr.Interface(
    fn=run_training,
    inputs=[],
    outputs="text",
    title="LLaMA LoRA Fine-Tuning",
    description="Click the button below to start fine-tuning the LLaMA 3.2 3B Instruct model using PEFT/LoRA."
)

iface.launch()