Spaces:
Running
Running
jedick
commited on
Commit
·
3e97aef
1
Parent(s):
d790ca4
Adjust app layout
Browse files
app.py
CHANGED
|
@@ -281,24 +281,14 @@ def run_judge(
|
|
| 281 |
# Create Gradio interface
|
| 282 |
with gr.Blocks(title="Noteworthy Differences") as demo:
|
| 283 |
with gr.Row():
|
| 284 |
-
|
| 285 |
-
gr.Markdown(
|
| 286 |
-
"""
|
| 287 |
-
# Noteworthy Differences
|
| 288 |
-
Compare the current revision of a Wikipedia article (introduction only) with an old revision (number of days or revisions behind).<br>
|
| 289 |
-
Two classifier models, with relatively short heuristic and few-shot prompts, and a judge predict the noteworthiness of the differences.<br>
|
| 290 |
-
The judge has a longer prompt for AI alignment, also in heuristic or few-shot styles, produced as described in the
|
| 291 |
-
[GitHub repository](https://github.com/jedick/noteworthy-differences).
|
| 292 |
"""
|
| 293 |
-
|
| 294 |
-
with
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
- **Questionable:** heuristic = few-shot, judge vetoes
|
| 300 |
-
"""
|
| 301 |
-
)
|
| 302 |
|
| 303 |
with gr.Row():
|
| 304 |
title_input = gr.Textbox(
|
|
@@ -323,9 +313,10 @@ with gr.Blocks(title="Noteworthy Differences") as demo:
|
|
| 323 |
old_timestamp = gr.Markdown("")
|
| 324 |
old_revision = gr.Textbox(label="", lines=15, max_lines=30, container=False)
|
| 325 |
gr.Markdown(
|
| 326 |
-
"""
|
| 327 |
-
- Page title is case
|
| 328 |
-
- Specify any number of days or up to 499 revisions behind
|
|
|
|
| 329 |
"""
|
| 330 |
)
|
| 331 |
|
|
@@ -333,6 +324,13 @@ with gr.Blocks(title="Noteworthy Differences") as demo:
|
|
| 333 |
gr.Markdown("### Current Revision")
|
| 334 |
new_timestamp = gr.Markdown("")
|
| 335 |
new_revision = gr.Textbox(label="", lines=15, max_lines=30, container=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
|
| 337 |
with gr.Column():
|
| 338 |
gr.Markdown("### Model Output")
|
|
|
|
| 281 |
# Create Gradio interface
|
| 282 |
with gr.Blocks(title="Noteworthy Differences") as demo:
|
| 283 |
with gr.Row():
|
| 284 |
+
gr.Markdown(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 285 |
"""
|
| 286 |
+
Compare current and old revisions of a Wikipedia article - you choose the number of days or revisions behind.<br>
|
| 287 |
+
Two classifier models (with heuristic and few-shot prompts) and a judge predict the noteworthiness of the differences.<br>
|
| 288 |
+
The judge was aligned with human preferences as described in the
|
| 289 |
+
[GitHub repository](https://github.com/jedick/noteworthy-differences).
|
| 290 |
+
"""
|
| 291 |
+
)
|
|
|
|
|
|
|
|
|
|
| 292 |
|
| 293 |
with gr.Row():
|
| 294 |
title_input = gr.Textbox(
|
|
|
|
| 313 |
old_timestamp = gr.Markdown("")
|
| 314 |
old_revision = gr.Textbox(label="", lines=15, max_lines=30, container=False)
|
| 315 |
gr.Markdown(
|
| 316 |
+
"""#### Query Instructions
|
| 317 |
+
- Page title is case sensitive; use underscores or spaces
|
| 318 |
+
- Specify any number of days or up to 499 revisions behind
|
| 319 |
+
- Only article introductions are downloaded
|
| 320 |
"""
|
| 321 |
)
|
| 322 |
|
|
|
|
| 324 |
gr.Markdown("### Current Revision")
|
| 325 |
new_timestamp = gr.Markdown("")
|
| 326 |
new_revision = gr.Textbox(label="", lines=15, max_lines=30, container=False)
|
| 327 |
+
gr.Markdown(
|
| 328 |
+
"""#### Confidence Key
|
| 329 |
+
- **High:** heuristic = few-shot, judge agrees
|
| 330 |
+
- **Moderate:** heuristic ≠ few-shot, judge decides
|
| 331 |
+
- **Questionable:** heuristic = few-shot, judge vetoes
|
| 332 |
+
"""
|
| 333 |
+
)
|
| 334 |
|
| 335 |
with gr.Column():
|
| 336 |
gr.Markdown("### Model Output")
|