Spaces:
Sleeping
Sleeping
Update app.py
Browse files704 unmodified lines705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735704 unmodified linesby=["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® columnstyled_df = df_builder_pivot.style.applymap(apply_colors, subset=["Trust Driver®"])# Convert the styled DataFrame to HTML for Gradio displaystyled_html = styled_df.to_html()interface = gr.Interface(fn=lambda: [styled_html, df_builder_pivot], # Return all outputs as a listinputs=[],outputs=[gr.HTML(), gr.Dataframe()])#df_builder_pivot = df_builder_pivot.sort_values(# by=["%"], ascending=[False]704 unmodified lines705706707708709710711704 unmodified linesby=["Trust Driver®", "%"], ascending=[True, False])#df_builder_pivot = df_builder_pivot.sort_values(# by=["%"], ascending=[False]
app.py+1-25