Spaces:
Sleeping
Sleeping
Update app.py
Browse files704 unmodified lines705706707708709710711712713714715716708717718719720721722723724725726727728729730731732709710711704 unmodified lines by=["Trust Driver®", "%"], ascending=[True, False] ) colors = { "Stability": "color: #42546C", "Development": "color: #D4B372", "Relationship": "color: #A94E4D", "Benefit": "color: #5C8084", "Vision": "color: #C98F69", "Competence": "color: #7B92A7", } def apply_colors(val): return colors.get(val, "") # Apply the color map to the Trust Driver® column styled_df = df_builder_pivot.style.applymap(apply_colors, subset=["Trust Driver®"]) # Convert the styled DataFrame to HTML for Gradio display styled_html = styled_df.to_html() interface = gr.Interface( fn=lambda: [styled_html, df_builder_pivot], # Return all outputs as a list inputs=[], outputs=[gr.HTML(), gr.Dataframe()] )
#df_builder_pivot = df_builder_pivot.sort_values( # by=["%"], ascending=[False]app.py+1-25