farquasar commited on
Commit
7252a1e
路
verified 路
1 Parent(s): a310c1b

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -548,7 +548,7 @@ theme = gr.themes.Soft(
548
  )
549
 
550
 
551
- with gr.Blocks(title=f"{APP_TITLE} 路 Learn Prompting", theme=theme, css=CSS) as demo:
552
  gr.HTML(
553
  """<section class="hero"><h1>PromptLab</h1>
554
  <p>Build, repair, test, and evaluate prompts. The goal is not to discover magic words鈥攊t is to design a clearer task and test whether the result improves.</p></section>"""
@@ -587,9 +587,9 @@ with gr.Blocks(title=f"{APP_TITLE} 路 Learn Prompting", theme=theme, css=CSS) as
587
  compact = gr.Button("Generate compact prompt")
588
  run_built = gr.Button("Run with Luna 路 medium")
589
  with gr.Row():
590
- built_prompt = gr.Textbox(label="Generated prompt", lines=18, show_copy_button=True)
591
  diagnostics = gr.Markdown("### Prompt check\nGenerate a prompt to see the diagnostic.")
592
- built_answer = gr.Textbox(label="Luna response", lines=14, show_copy_button=True)
593
  built_status = gr.Markdown()
594
 
595
  fields = [task, context, audience, input_data, constraints, output_format, examples, evidence, uncertainty, criteria]
@@ -608,8 +608,8 @@ with gr.Blocks(title=f"{APP_TITLE} 路 Learn Prompting", theme=theme, css=CSS) as
608
  gr.Markdown("Compare prompts by the behaviours they invite鈥攏ot by length or sophistication of vocabulary.")
609
  example_name = gr.Dropdown(list(EXAMPLES), value="Customer segmentation", label="Example")
610
  with gr.Row():
611
- weak_prompt = gr.Textbox(label="Weak prompt", lines=12, interactive=True, show_copy_button=True)
612
- strong_prompt = gr.Textbox(label="Improved prompt", lines=12, interactive=True, show_copy_button=True)
613
  example_issues = gr.Markdown()
614
  gr.Markdown(
615
  """<div class="card-note"><b>Mini-experiment:</b> run both prompts with the same model, input, and settings. Then evaluate the outputs in Tab 4. Change one design choice at a time if you want to know what caused the difference.</div>"""
@@ -708,4 +708,4 @@ with gr.Blocks(title=f"{APP_TITLE} 路 Learn Prompting", theme=theme, css=CSS) as
708
 
709
 
710
  if __name__ == "__main__":
711
- demo.queue(default_concurrency_limit=16).launch()
 
548
  )
549
 
550
 
551
+ with gr.Blocks(title=f"{APP_TITLE} 路 Learn Prompting") as demo:
552
  gr.HTML(
553
  """<section class="hero"><h1>PromptLab</h1>
554
  <p>Build, repair, test, and evaluate prompts. The goal is not to discover magic words鈥攊t is to design a clearer task and test whether the result improves.</p></section>"""
 
587
  compact = gr.Button("Generate compact prompt")
588
  run_built = gr.Button("Run with Luna 路 medium")
589
  with gr.Row():
590
+ built_prompt = gr.Textbox(label="Generated prompt", lines=18, buttons=["copy"])
591
  diagnostics = gr.Markdown("### Prompt check\nGenerate a prompt to see the diagnostic.")
592
+ built_answer = gr.Textbox(label="Luna response", lines=14, buttons=["copy"])
593
  built_status = gr.Markdown()
594
 
595
  fields = [task, context, audience, input_data, constraints, output_format, examples, evidence, uncertainty, criteria]
 
608
  gr.Markdown("Compare prompts by the behaviours they invite鈥攏ot by length or sophistication of vocabulary.")
609
  example_name = gr.Dropdown(list(EXAMPLES), value="Customer segmentation", label="Example")
610
  with gr.Row():
611
+ weak_prompt = gr.Textbox(label="Weak prompt", lines=12, interactive=True, buttons=["copy"])
612
+ strong_prompt = gr.Textbox(label="Improved prompt", lines=12, interactive=True, buttons=["copy"])
613
  example_issues = gr.Markdown()
614
  gr.Markdown(
615
  """<div class="card-note"><b>Mini-experiment:</b> run both prompts with the same model, input, and settings. Then evaluate the outputs in Tab 4. Change one design choice at a time if you want to know what caused the difference.</div>"""
 
708
 
709
 
710
  if __name__ == "__main__":
711
+ demo.queue(default_concurrency_limit=16).launch(theme=theme, css=CSS)