safe-talk / app.py
rshakked's picture
feat: add Gradio progress bar and streaming log updates during training
9364099
raw
history blame
546 Bytes
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()