Wajahat698 commited on
Commit
b39b88e
·
verified ·
1 Parent(s): 0fd88c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -45
app.py CHANGED
@@ -1407,54 +1407,21 @@ def variable_outputs(file_inputs):
1407
 
1408
  return output_components + plots_invisible * (max_outputs - k)
1409
 
1410
-
1411
  def reset_outputs():
1412
- outputs = []
1413
-
1414
- # First visible set
1415
- outputs += [
1416
- gr.Markdown("<span style='font-size:20px; font-weight:bold;'>Trust and NPS Drivers</span>", visible=True),
1417
- gr.Markdown(
1418
- "This analysis shows which Trust Buckets® are most effective in building trust and improving your key performance indicators (KPIs)."
1419
- "<br><br>"
1420
- "The middle line is the average importance. The bars extending to the right show which Trust Buckets® are most important. The higher the percentage, the more important the Trust Bucket® is to your audience.",
1421
- visible=True,
1422
- ),
1423
- gr.Image(value=None, label="Trust Drivers", visible=False),
1424
- gr.Image(value=None, label="NPS Drivers", visible=False),
1425
- gr.Image(value=None, label="Loyalty Drivers", visible=False),
1426
- gr.Image(value=None, label="Consideration Drivers", visible=False),
1427
- gr.Image(value=None, label="Satisfaction Drivers", visible=False),
1428
- gr.Textbox(value=None, label="Analysis Summary", visible=False),
1429
- gr.Markdown("<span style='font-size:20px; font-weight:bold;'>TrustBuilders®</span>", visible=True),
1430
- gr.Markdown(
1431
- "These are the specific reasons to trust and recommend. They can be your brand values, features, attributes, programs, and messages. "
1432
- "<br>For practical purposes, they tell you exactly what to do and say to build more trust and improve your KPIs. "
1433
- "<br>In the table, use the little arrows to toggle by Trust Bucket® or Trust Builder® importance. "
1434
- "<br>Tip: Compare Owners and Prospects. Even though some of the Trust Buckets® are the same, the Trust Builders® are very different.",
1435
- visible=True,
1436
- ),
1437
- gr.Dataframe(value=None, label="", visible=True),
1438
  ]
1439
 
1440
- # Add invisible placeholders for remaining datasets
1441
- for _ in range(1, max_outputs):
1442
- outputs += [
1443
- gr.Markdown("", visible=False), gr.Markdown("", visible=False),
1444
- gr.Image(value=None, label="", visible=False),
1445
- gr.Markdown("", visible=False), gr.Markdown("", visible=False),
1446
- gr.Image(value=None, label="", visible=False),
1447
- gr.Image(value=None, label="", visible=False),
1448
- gr.Image(value=None, label="", visible=False),
1449
- gr.Image(value=None, label="", visible=False),
1450
- gr.Image(value=None, label="", visible=False),
1451
- gr.Textbox(value=None, label="", visible=False),
1452
- gr.Markdown("", visible=False), gr.Markdown("", visible=False),
1453
- gr.Dataframe(value=None, label="", visible=False)
1454
- ]
1455
-
1456
- return outputs
1457
-
1458
 
1459
  def data_processing(file_path):
1460
  """
 
1407
 
1408
  return output_components + plots_invisible * (max_outputs - k)
1409
 
 
1410
  def reset_outputs():
1411
+ return [
1412
+ gr.Markdown(visible=True), # markdown_3
1413
+ gr.Markdown(visible=True), # markdown_4
1414
+ gr.Image(visible=True), # trust_plot
1415
+ gr.Image(visible=True), # nps_plot
1416
+ gr.Image(visible=True), # loyalty_plot
1417
+ gr.Image(visible=True), # consideration_plot
1418
+ gr.Image(visible=True), # satisfaction_plot
1419
+ gr.Textbox(visible=True), # summary_text
1420
+ gr.Markdown(visible=True), # markdown_5
1421
+ gr.Markdown(visible=True), # markdown_6
1422
+ gr.Dataframe(visible=True) # df_builder_pivot
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1423
  ]
1424
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1425
 
1426
  def data_processing(file_path):
1427
  """