File size: 811 Bytes
08ae6c5
a130fc3
2a5f9fb
a130fc3
 
 
 
 
8c49cb6
a130fc3
2a73469
1ffc326
a130fc3
 
 
 
 
d084b26
a130fc3
 
 
 
 
8c49cb6
a130fc3
 
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
import logging
import sys

import gradio as gr
from main_backend_lighteval import run_auto_eval
from src.display.log_visualizer import log_file_to_html_string
from src.display.css_html_js import dark_mode_gradio_js
from src.envs import REFRESH_RATE

logging.basicConfig(level=logging.INFO)


intro_md = f"""
# Intro
This is just a visual for the auto evaluator. Note that the lines of the log visual are reversed.
# Logs
"""

with gr.Blocks(js=dark_mode_gradio_js) as demo:
    with gr.Tab("Application"):
        gr.Markdown(intro_md)
        dummy = gr.Markdown(run_auto_eval, every=REFRESH_RATE, visible=False)
        output = gr.HTML(log_file_to_html_string, every=10)

if __name__ == '__main__':
    demo.queue(default_concurrency_limit=40).launch(server_name="0.0.0.0", show_error=True, server_port=7860)