BtB-ExpC commited on
Commit
56e7395
·
1 Parent(s): a132742

control dropdowns in 1 row

Browse files
app/ui/diagnoser_tab.py CHANGED
@@ -9,7 +9,7 @@ def build_diagnoser_tab():
9
  """
10
  Builds and returns the Diagnoser tab UI elements (and any references).
11
  """
12
- with gr.TabItem("🩺 Diagnose exercise"):
13
  # Insert an HTML info icon with a tooltip at the top of the tab content.
14
  gr.HTML(
15
  """
 
9
  """
10
  Builds and returns the Diagnoser tab UI elements (and any references).
11
  """
12
+ with gr.TabItem("🩺 Diagnose Exercise"):
13
  # Insert an HTML info icon with a tooltip at the top of the tab content.
14
  gr.HTML(
15
  """
app/ui/distractors_tab.py CHANGED
@@ -9,12 +9,12 @@ def build_distractors_tab():
9
  """
10
  Builds and returns the Diagnoser tab UI elements (and any references).
11
  """
12
- with gr.TabItem("🤔 Brainstorm distractors"):
13
  # Insert an HTML info icon with a tooltip at the top of the tab content.
14
  gr.HTML(
15
  """
16
  <div style="margin-bottom: 10px;">
17
- <span style="font-size: 1.5em; cursor: help;" title="Generates alternative distractors for the given exercise in two stages. First, 2x2 brainstorming prompts (2 approaches, each using LLM 1 & LLM 2 once) generate a bunch of options, then a final consolidation prompt (using LLM 3) combines all results together for presentation below.\n\nFor both stages, prompts can be customized via dropdowns to influence the amount of distractors that will be generated during each (brainstormed and displayed).\n5-6 LLM calls per final response.">
18
  ℹ️
19
  </span>
20
  </div>
@@ -42,7 +42,7 @@ def build_distractors_tab():
42
  interactive=True,
43
  )
44
  intermediate_distractors_specification = gr.Dropdown(
45
- choices=[" ", " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 ", " 10 ", " a few ", " some ",
46
  " a whole lot of ", " a wide range of ", " novel "],
47
  value=" 8 ",
48
  label="Brainstorm X distractors x4",
 
9
  """
10
  Builds and returns the Diagnoser tab UI elements (and any references).
11
  """
12
+ with gr.TabItem("🤔 Brainstorm Distractors"):
13
  # Insert an HTML info icon with a tooltip at the top of the tab content.
14
  gr.HTML(
15
  """
16
  <div style="margin-bottom: 10px;">
17
+ <span style="font-size: 1.5em; cursor: help;" title="Generates alternative distractors for the given exercise in two stages. First, 2x2 brainstorming prompts (2 approaches, each using LLM 1 & LLM 2 once) generate a bunch of options. Then, a final consolidation prompt (using LLM 3) combines all results together for presentation below.\n\nFor both stages, prompts can be customized via dropdowns to instruct the models how many distractors they should generate and how/whether to filter the results (brainstorm X/display X).\n5-6 LLM calls per final response.">
18
  ℹ️
19
  </span>
20
  </div>
 
42
  interactive=True,
43
  )
44
  intermediate_distractors_specification = gr.Dropdown(
45
+ choices=[" ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 ", " 10 ", " 11 ", " 12 ", " a few ", " some ",
46
  " a whole lot of ", " a wide range of ", " novel "],
47
  value=" 8 ",
48
  label="Brainstorm X distractors x4",
app/ui/learning_objectives_tab.py CHANGED
@@ -13,21 +13,23 @@ def build_learning_objectives_tab():
13
  </div>
14
  """
15
  )
16
- # 2 dropdowns for the user-chosen LLMs:
17
- model_choice_1 = gr.Dropdown(
18
- choices=list(llms.keys()),
19
- label="LLM 1"
20
- )
21
- model_choice_2 = gr.Dropdown(
22
- choices=list(llms.keys()),
23
- label="LLM 2"
24
- )
25
- text_format = gr.Dropdown(
26
- choices=["Markdown", "XML", "Plaintext", "Raw (input not reformatted)"],
27
- value="Markdown",
28
- label="Studytext Reformat",
29
- interactive=True,
30
- )
 
 
31
 
32
  studytext_input = gr.Textbox(label="Enter a study text in any format", placeholder="<h3>Infusie en infuussystemen</h3> <h4>Inleiding</h4> ...")
33
  learning_objectives_button = gr.Button("Identify LOs")
 
13
  </div>
14
  """
15
  )
16
+
17
+ with gr.Row():
18
+ # 2 dropdowns for the user-chosen LLMs:
19
+ model_choice_1 = gr.Dropdown(
20
+ choices=list(llms.keys()),
21
+ label="LLM 1"
22
+ )
23
+ model_choice_2 = gr.Dropdown(
24
+ choices=list(llms.keys()),
25
+ label="LLM 2"
26
+ )
27
+ text_format = gr.Dropdown(
28
+ choices=["Markdown", "XML", "Plaintext", "Raw (input not reformatted)"],
29
+ value="Markdown",
30
+ label="Studytext Reformat",
31
+ interactive=True,
32
+ )
33
 
34
  studytext_input = gr.Textbox(label="Enter a study text in any format", placeholder="<h3>Infusie en infuussystemen</h3> <h4>Inleiding</h4> ...")
35
  learning_objectives_button = gr.Button("Identify LOs")