jostlebot Claude Opus 4.5 commited on
Commit
892b134
·
1 Parent(s): 834d5f9

Revert template loader from app - keep prompts in folder only

Browse files

Templates available in /templates folder for manual use:
- base_vercel.txt
- warm_bridge.txt
- warm_processing.txt

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Files changed (2) hide show
  1. __pycache__/app.cpython-313.pyc +0 -0
  2. app.py +3 -29
__pycache__/app.cpython-313.pyc CHANGED
Binary files a/__pycache__/app.cpython-313.pyc and b/__pycache__/app.cpython-313.pyc differ
 
app.py CHANGED
@@ -28,14 +28,6 @@ ASSESSMENT_FRAMEWORK = load_file(KNOWLEDGE_DIR / "prompt_assessment_framework.md
28
  MASTER_GAPS = load_file(KNOWLEDGE_DIR / "master_gaps.md")
29
  CORE_RECOMMENDATIONS = load_file(KNOWLEDGE_DIR / "core_recommendations.md")
30
 
31
- # Pre-load A/B test templates
32
- TEMPLATES_DIR = Path(__file__).parent / "templates"
33
- AB_TEMPLATES = {
34
- "Base (Supportive but Bounded)": load_file(TEMPLATES_DIR / "base_vercel.txt"),
35
- "Warm Bridge (Route to Humans)": load_file(TEMPLATES_DIR / "warm_bridge.txt"),
36
- "Warm Processing (Extended Engagement)": load_file(TEMPLATES_DIR / "warm_processing.txt"),
37
- }
38
-
39
  # Test personas - diverse users across vulnerability and difference
40
  PERSONAS = [
41
  "Crisis Disclosure",
@@ -399,13 +391,6 @@ def clear_sessions():
399
  return [], "Sessions cleared."
400
 
401
 
402
- def load_template(template_name):
403
- """Load a template prompt."""
404
- if template_name == "Custom" or template_name not in AB_TEMPLATES:
405
- return ""
406
- return AB_TEMPLATES.get(template_name, "")
407
-
408
-
409
  def analyze_conversation(api_key_input, system_prompt, history):
410
  """Deep clinical analysis of a conversation using ARI framework."""
411
  key_to_use = api_key_input.strip() if api_key_input else ""
@@ -810,20 +795,12 @@ with gr.Blocks(title="PromptWork", theme=gr.themes.Soft()) as app:
810
  # TAB 1: Prompt Input
811
  with gr.Tab("Prompt Input"):
812
  gr.Markdown("### System Prompt Under Review")
813
-
814
- with gr.Row():
815
- gr.Markdown("*Paste a custom prompt or load a variant for A/B testing:*")
816
- template_dropdown = gr.Dropdown(
817
- choices=["Custom"] + list(AB_TEMPLATES.keys()),
818
- value="Custom",
819
- label="Load Template",
820
- scale=1
821
- )
822
 
823
  prompt_input = gr.Textbox(
824
  label="System Prompt",
825
- lines=20,
826
- placeholder="Paste the system prompt you're consulting on, or select a template above..."
827
  )
828
 
829
  gr.Markdown("""
@@ -996,9 +973,6 @@ with gr.Blocks(title="PromptWork", theme=gr.themes.Soft()) as app:
996
  # Wire up events
997
  test_key_btn.click(test_api_key, [api_key], [key_status])
998
 
999
- # Template loading
1000
- template_dropdown.change(load_template, [template_dropdown], [prompt_input])
1001
-
1002
  get_opening_btn.click(get_opening, [persona_dropdown], [msg_input])
1003
  analyze_conv_btn.click(analyze_conversation, [api_key, prompt_input, chatbot], [analysis_output])
1004
 
 
28
  MASTER_GAPS = load_file(KNOWLEDGE_DIR / "master_gaps.md")
29
  CORE_RECOMMENDATIONS = load_file(KNOWLEDGE_DIR / "core_recommendations.md")
30
 
 
 
 
 
 
 
 
 
31
  # Test personas - diverse users across vulnerability and difference
32
  PERSONAS = [
33
  "Crisis Disclosure",
 
391
  return [], "Sessions cleared."
392
 
393
 
 
 
 
 
 
 
 
394
  def analyze_conversation(api_key_input, system_prompt, history):
395
  """Deep clinical analysis of a conversation using ARI framework."""
396
  key_to_use = api_key_input.strip() if api_key_input else ""
 
795
  # TAB 1: Prompt Input
796
  with gr.Tab("Prompt Input"):
797
  gr.Markdown("### System Prompt Under Review")
798
+ gr.Markdown("*Paste the system prompt you're assessing. This will be tested in the Test & Analyze tab.*")
 
 
 
 
 
 
 
 
799
 
800
  prompt_input = gr.Textbox(
801
  label="System Prompt",
802
+ lines=22,
803
+ placeholder="Paste the system prompt you're consulting on..."
804
  )
805
 
806
  gr.Markdown("""
 
973
  # Wire up events
974
  test_key_btn.click(test_api_key, [api_key], [key_status])
975
 
 
 
 
976
  get_opening_btn.click(get_opening, [persona_dropdown], [msg_input])
977
  analyze_conv_btn.click(analyze_conversation, [api_key, prompt_input, chatbot], [analysis_output])
978