import gradio as gr | |
from train_abuse_model import run_training | |
with gr.Blocks() as demo: | |
gr.Markdown("## π§ Abuse Detection Fine-Tuning App") | |
gr.Markdown( | |
"β οΈ **Important:** Keep this tab open and prevent your computer from sleeping while training runs." | |
) | |
with gr.Row(): | |
start_btn = gr.Button("π Start Training") | |
output_box = gr.Textbox(label="Live Training Logs", lines=25, interactive=False) | |
start_btn.click(fn=run_training, outputs=output_box) | |
if __name__ == "__main__": | |
demo.launch() | |