Spaces:
Runtime error
Runtime error
| import pandas as pd | |
| import gradio as gr | |
| # Creating a sample dataframe | |
| df = pd.DataFrame({ | |
| "ChatGPT 3.5": [14, 4, 5, 4, 1, 8], | |
| "gemma-2b-it": [5, 2, 54, 3, 2, 6], | |
| "Synatra-7B-v0.3-dpo": [20, 21, 7, 3, 8, 4], | |
| "EEVE-Korean-Instruct-10.8B-v1.0": [14, 3, 6, 2, 6, 7], | |
| "phi-2": [23, 45, 64, 32, 23, 5] | |
| }) | |
| # Applying style to highlight the maximum value in each row | |
| styler = df.style.highlight_max(color='lightgreen', axis=0) | |
| # Displaying the styled dataframe in Gradio | |
| with gr.Blocks() as demo: | |
| gr.DataFrame(styler) | |
| demo.launch() | |