Spaces:
Runtime error
Runtime error
File size: 683 Bytes
9c0fb3e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import gradio as gr
import plotly.express as px
import numpy as np
def get_plot(period=1):
run = api.run("fengshenbang/llama2_13b_cpt_v1/kakfv1ab")
metrics_dataframe = run.history()
y = metrics_dataframe['train/lm_loss'].tolist()
x = np.arange(0, len(y), 1)
y = np.array(y)
fig = px.line(x=x, y=y)
return fig
with gr.Blocks() as demo:
with gr.Row():
with gr.Column():
gr.Markdown("Ziya-LLaMA2-CPT/train/lm_loss")
plot = gr.Plot(label="Plot (updates every half second)")
dep = demo.load(get_plot, None, plot, every=1, live=False)
if __name__ == "__main__":
demo.queue().launch(share=True) |