File size: 303 Bytes
2cef844
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import subprocess, gradio as gr
subprocess.Popen(["python","train.py"])
def show():
    try: return open("/tmp/log.txt").read()
    except Exception: return "starting..."
with gr.Blocks() as d:
    t=gr.Textbox(label="log",lines=30); gr.Timer(10).tick(show,outputs=t); d.load(show,outputs=t)
d.launch()