jack-donlan commited on
Commit
43292b5
·
verified ·
1 Parent(s): ac63870

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -21
app.py CHANGED
@@ -43,19 +43,6 @@ description2 = """
43
  To use the app, click on one of the examples, or adjust the values of the seven employee satisfaction factors, and click Analyze.
44
  """
45
 
46
- def set_values(*values):
47
- return values
48
-
49
- #Create Example Value Sets
50
- example_titles = ["Example 1: Balanced", "Example 2: High Variation", "Example 3: Moderate", "Example 4: Extreme"]
51
- example_values = [
52
- [3.7,3.1,3.1,3.3,3.1,2.9,3.1],
53
- [3.7,3.1,5.0,5.0,3.1,5.0,3.1],
54
- [4.2,3.8,4.0,4.1,3.8,4.0,4.0],
55
- [4.2,3.8,5.0,5.0,3.8,5.0,4.0]
56
- ]
57
-
58
-
59
  with gr.Blocks(title = title) as demo:
60
  gr.Markdown(f"## {title}")
61
  gr.Markdown(description1)
@@ -83,13 +70,8 @@ with gr.Blocks(title = title) as demo:
83
  )
84
 
85
  gr.Markdown('### Click on any of the examples below to see how it works:')
86
-
87
- inputs = [gr.Number(label=name) for name in
88
- ["PassionateAtWork", "Workload", "SupportiveGM", "WorkEnvironment", "Informed", "LearningDevelopment", "JobSecurity"]]
89
-
90
- output = gr.Label() # You can adjust this to match your main function output type
91
-
92
- for title, values in zip(example_titles, example_values):
93
- gr.Button(title).click(set_values, values, inputs)
94
 
95
  demo.launch()
 
43
  To use the app, click on one of the examples, or adjust the values of the seven employee satisfaction factors, and click Analyze.
44
  """
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  with gr.Blocks(title = title) as demo:
47
  gr.Markdown(f"## {title}")
48
  gr.Markdown(description1)
 
70
  )
71
 
72
  gr.Markdown('### Click on any of the examples below to see how it works:')
73
+ gr.Examples([[3.7,3.1,3.1,3.3,3.1,2.9,3.1], [3.7,3.1,5.0,5.0,3.1,5.0,3.1], [4.2,3.8,4.0,4.1,3.8,4.0,4.0], [4.2,3.8,5.0,5.0,3.8,5.0,4.0]],
74
+ [PassionateAtWork,Workload,SupportiveGM,WorkEnvironment,Informed,LearningDevelopment,JobSecurity],
75
+ [label,local_plot], main_func, cache_examples=True)
 
 
 
 
 
76
 
77
  demo.launch()