Esimuda's picture
Upload folder using huggingface_hub
2cef844 verified
Raw History Blame Contribute Delete
303 Bytes
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()