Spaces:
Sleeping
Sleeping
changed plot labeling for mobile, added more documentation
Browse files
app.py
CHANGED
@@ -434,9 +434,9 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
|
|
434 |
|
435 |
# control applicant distribution
|
436 |
# with gr.Group():
|
437 |
-
loc_slider = gr.Slider(0,100, step=1, value=70, label="Mean (Population)")
|
438 |
-
scale_slider = gr.Slider(0, 80, step=1, value=50, label="Standard Deviation (Population)")
|
439 |
-
alpha_slider = gr.Slider(-10, 10, step=1, value=0, label="Skewness (Population)")
|
440 |
|
441 |
# simumlation-settings:
|
442 |
with gr.Group():
|
@@ -446,29 +446,29 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
|
|
446 |
top_n = gr.Slider(1, 40, step=1, value=5, label="Top N", info='How many candidates can be selected.')
|
447 |
|
448 |
judge_error = gr.Slider(0, 20, step=1, value=7, label="Judge Error", info='How much error judges can plausibly commit in their ratings.')
|
449 |
-
judges_attitude = gr.Slider(0, 10, step=.1, value=1.7, label="Judges attitude-range")
|
450 |
|
451 |
-
judgment_coarse_graining_true_false = gr.Checkbox(value= True, label="Coarse grain judgements.")
|
452 |
-
judgment_coarse_graining = gr.Slider(0, 30, step=1, value=7, label="Coarse Graining Factor")
|
453 |
num_runs = gr.Slider(10, 1000, step=10,value=100, label="Number of Runs")
|
454 |
|
455 |
# The button to run the simulation
|
456 |
# Sliders for alpha and beta parameters of the beta distribution
|
457 |
|
458 |
with gr.Column():
|
459 |
-
with gr.Group():
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
with gr.Group():
|
466 |
# Your existing plot output
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
|
473 |
# Function call on button click
|
474 |
run_button.click(
|
|
|
434 |
|
435 |
# control applicant distribution
|
436 |
# with gr.Group():
|
437 |
+
loc_slider = gr.Slider(0,100, step=1, value=70, label="Mean (Population)", info='Where the center of the distribution is.')
|
438 |
+
scale_slider = gr.Slider(0, 80, step=1, value=50, label="Standard Deviation (Population)", info='How wide the distribution is.')
|
439 |
+
alpha_slider = gr.Slider(-10, 10, step=1, value=0, label="Skewness (Population)", info='How asymmetric the distribution is.')
|
440 |
|
441 |
# simumlation-settings:
|
442 |
with gr.Group():
|
|
|
446 |
top_n = gr.Slider(1, 40, step=1, value=5, label="Top N", info='How many candidates can be selected.')
|
447 |
|
448 |
judge_error = gr.Slider(0, 20, step=1, value=7, label="Judge Error", info='How much error judges can plausibly commit in their ratings.')
|
449 |
+
judges_attitude = gr.Slider(0, 10, step=.1, value=1.7, label="Judges attitude-range", info='How harsh/generous individual judges can be. (Max. skewness of their error distributions)')
|
450 |
|
451 |
+
judgment_coarse_graining_true_false = gr.Checkbox(value= True, label="Coarse grain judgements.", info='Whether judgements are made on a coarser scale.')
|
452 |
+
judgment_coarse_graining = gr.Slider(0, 30, step=1, value=7, label="Coarse Graining Factor", info='Number of ratings on the judgement-scale.')
|
453 |
num_runs = gr.Slider(10, 1000, step=10,value=100, label="Number of Runs")
|
454 |
|
455 |
# The button to run the simulation
|
456 |
# Sliders for alpha and beta parameters of the beta distribution
|
457 |
|
458 |
with gr.Column():
|
459 |
+
# with gr.Group():
|
460 |
+
population_plot = gr.Plot(label="Population",render=True)
|
461 |
+
gr.Markdown("""**Applicants quality distribution & judgement errors** – Above you can see in red the distribution from which we draw the real qualities of our applicants.
|
462 |
+
You can alter its **Mean, Scale and Skewness** on the left side. You can also see how large the errors are,
|
463 |
+
which our judges commit, and how harshly the most harsh and most generous judges judge.
|
464 |
+
You can alter these values by playing with the **Judge Error** and the **Judge's attitude range** on the left.""")
|
465 |
+
# with gr.Group():
|
466 |
# Your existing plot output
|
467 |
+
plot_output = gr.Plot(label="Results",show_label=True)
|
468 |
+
gr.Markdown("""**Simulation Results** – Above are the results of our simulation. The green bars represent the frequency of the first, second,
|
469 |
+
and subsequent applicants being selected for the **Top N** spots. The shade of green shows the rank each
|
470 |
+
applicant achieved in the number of simulations. The grey area indicates the frequency with which applicants,
|
471 |
+
who were objectively top candidates, failed to be selected into the Top N at all.""")
|
472 |
|
473 |
# Function call on button click
|
474 |
run_button.click(
|