BtB-ExpC commited on
Commit
a5fa1b4
·
1 Parent(s): 1c4bff0

tooltip change

Browse files
Files changed (1) hide show
  1. app.py +22 -12
app.py CHANGED
@@ -80,13 +80,13 @@ with gr.Blocks() as demo:
80
  # --- Login Page ---
81
  with gr.Column(visible=True, elem_id="login_page") as login_container:
82
  gr.Markdown("## 🔒 Please Login")
83
- password_input = gr.Textbox(label="Enter Password", type="password", placeholder="Enter password to access the app")
84
  login_button = gr.Button("Login")
85
  login_error = gr.Markdown(value="")
86
 
87
  # --- Main App (initially hidden) ---
88
  with gr.Column(visible=False, elem_id="main_app") as app_container:
89
- gr.Markdown("## Pick the tab for your task of choice below\n### Diagnosing issues / Brainstorming different distractors [for multiple choice exercises]")
90
  # Dropdown for LLM selection.
91
  # Create a row for the control dropdowns
92
  with gr.Row():
@@ -115,35 +115,45 @@ with gr.Blocks() as demo:
115
  outputs=[exercise_format]
116
  )
117
  with gr.Tabs():
118
- with gr.TabItem("Diagnose issues"):
119
  # Insert an HTML info icon with a tooltip at the top of the tab content.
120
  gr.HTML(
121
  """
122
  <div style="margin-bottom: 10px;">
123
- <span style="font-size: 1.5em; cursor: help;" title="Diagnoser: This tab first standardizes the exercise description (using a fixed model) and then diagnoses potential issues using the selected model.">
124
- 🩺
125
  </span>
126
- <span style="font-size: 1em; margin-left: 5px;">Diagnoser</span>
127
  </div>
128
  """
129
  )
130
- gr.Markdown("### Diagnoser")
131
  diagnoser_input = gr.Textbox(label="Enter exercise(s) in any format", placeholder="Exercise body: <mc:exercise xmlns:mc=...")
132
  diagnoser_button = gr.Button("Submit")
133
  diagnoser_output = gr.Textbox(label="Diagnosis", interactive=False)
134
- with gr.TabItem("Brainstorm distractors"):
135
  # Insert an HTML info icon with a tooltip at the top of the tab content.
136
  gr.HTML(
137
  """
138
  <div style="margin-bottom: 10px;">
139
- <span style="font-size: 1.5em; cursor: help;" title="Distractors brainstorm: This tab provides creative distractors and brainstorming ideas based on your query.">
140
- 💡
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  </span>
142
- <span style="font-size: 1em; margin-left: 5px;">Distractors brainstorm</span>
143
  </div>
144
  """
145
  )
146
- gr.Markdown("### Distractors brainstorm")
147
  distractors_input = gr.Textbox(label="Enter exercise(s) in any format", placeholder="Paste your exercise here...")
148
  distractors_button = gr.Button("Submit")
149
  distractors_output = gr.Textbox(label="Response", interactive=False)
 
80
  # --- Login Page ---
81
  with gr.Column(visible=True, elem_id="login_page") as login_container:
82
  gr.Markdown("## 🔒 Please Login")
83
+ password_input = gr.Textbox(label="Enter Password", type="password", placeholder="hunter2")
84
  login_button = gr.Button("Login")
85
  login_error = gr.Markdown(value="")
86
 
87
  # --- Main App (initially hidden) ---
88
  with gr.Column(visible=False, elem_id="main_app") as app_container:
89
+ gr.Markdown("## Pick the tab for your task of choice below\n#### _hover mouse over ℹ️ for more info_")
90
  # Dropdown for LLM selection.
91
  # Create a row for the control dropdowns
92
  with gr.Row():
 
115
  outputs=[exercise_format]
116
  )
117
  with gr.Tabs():
118
+ with gr.TabItem("Validate exercise 🩺"):
119
  # Insert an HTML info icon with a tooltip at the top of the tab content.
120
  gr.HTML(
121
  """
122
  <div style="margin-bottom: 10px;">
123
+ <span style="font-size: 1.5em; cursor: help;" title="Diagnoses potential issues for the given exercise(s).">
124
+ ️ℹ️
125
  </span>
 
126
  </div>
127
  """
128
  )
 
129
  diagnoser_input = gr.Textbox(label="Enter exercise(s) in any format", placeholder="Exercise body: <mc:exercise xmlns:mc=...")
130
  diagnoser_button = gr.Button("Submit")
131
  diagnoser_output = gr.Textbox(label="Diagnosis", interactive=False)
132
+ with gr.TabItem("Generate distractors 🤔"):
133
  # Insert an HTML info icon with a tooltip at the top of the tab content.
134
  gr.HTML(
135
  """
136
  <div style="margin-bottom: 10px;">
137
+ <span style="font-size: 1.5em; cursor: help;" title="Generate more different distractors for the given exercise">
138
+ ℹ️
139
+ </span>
140
+ </div>
141
+ """
142
+ )
143
+ distractors_input = gr.Textbox(label="Enter exercise(s) in any format", placeholder="Paste your exercise here...")
144
+ distractors_button = gr.Button("Submit")
145
+ distractors_output = gr.Textbox(label="Response", interactive=False)
146
+ with gr.TabItem("Generate learning objectives 🚧"):
147
+ # Insert an HTML info icon with a tooltip at the top of the tab content.
148
+ gr.HTML(
149
+ """
150
+ <div style="margin-bottom: 10px;">
151
+ <span style="font-size: 1.5em; cursor: help;" title="Generate learning objectives for the given study text">
152
+ ℹ️
153
  </span>
 
154
  </div>
155
  """
156
  )
 
157
  distractors_input = gr.Textbox(label="Enter exercise(s) in any format", placeholder="Paste your exercise here...")
158
  distractors_button = gr.Button("Submit")
159
  distractors_output = gr.Textbox(label="Response", interactive=False)