File size: 479 Bytes
599c0a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
import os

# Function to start training
def start_training():
    os.system("python train.py")  # Runs your training script
    return "Training Started! 🚀 Check logs in 'train_log.txt'."

# Create Gradio UI
iface = gr.Interface(
    fn=start_training,
    inputs=[], 
    outputs="text",
    title="Train TinyLlama on Hugging Face Spaces",
    description="Click the button below to start fine-tuning TinyLlama."
)

# Launch the Gradio app
iface.launch()