Spaces:
Runtime error
Runtime error
File size: 693 Bytes
9c0fb3e 1a84bc8 9c0fb3e cc6c9ad 9c0fb3e 85f1687 9c0fb3e cc6c9ad |
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 29 30 31 |
import gradio as gr
import plotly.express as px
import numpy as np
import wandb
api = wandb.Api()
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)
if __name__ == "__main__":
demo.queue().launch() |