anotheruserishere commited on
Commit
ad477eb
Β·
verified Β·
1 Parent(s): 547873b

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +21 -9
app.py CHANGED
@@ -702,11 +702,12 @@ def initial_load(model_id: str, system_prompt: str, user_prompt: str, s: Session
702
  # ── Gradio UI ─────────────────────────────────────────────────────────────
703
  CSS = """
704
  /* ── Global tightening ── */
705
- .gradio-container { max-width: 100% !important; padding: 8px 12px !important; }
706
- .gradio-container .main { padding: 0 !important; gap: 6px !important; }
707
- .gradio-container .gap, .gradio-container .form { gap: 6px !important; }
708
- .gradio-container .block { padding: 4px !important; border-radius: 4px !important; }
709
  .gradio-container .gr-block { padding: 0 !important; }
 
710
 
711
  /* ── Header: kill the giant title margins ── */
712
  #hdr h1 { font-size: 18px !important; margin: 0 !important; padding: 0 !important; line-height: 1.2 !important; }
@@ -799,8 +800,13 @@ def build_ui():
799
  show_label=True)
800
  system_prompt = gr.Textbox(label="System", value="",
801
  lines=1, max_lines=3, scale=4, container=True)
802
- user_prompt = gr.Textbox(label="User", value="",
803
- lines=1, max_lines=3, scale=5, container=True)
 
 
 
 
 
804
  load_btn = gr.Button("Load", variant="primary", scale=1, min_width=80)
805
 
806
  muted_html = gr.HTML(elem_id="muted-row")
@@ -810,10 +816,16 @@ def build_ui():
810
  "<div class='pane-body'><i>Click <b>Load</b> to begin.</i></div></div>")
811
 
812
  # ── Command bar: directly under Context (eye scans context β†’ types command) ──
813
- gr.Markdown(HELP, elem_id="help")
814
  with gr.Row(elem_id="cmdbar"):
815
- cmd = gr.Textbox(label="CMD", placeholder="1-N Β· h * Β· top 1000,3,1 Β· spark the Β· mute 5 2 Β· …",
816
- scale=10, autofocus=True, lines=1, max_lines=1, container=True)
 
 
 
 
 
 
 
817
  run_btn = gr.Button("Run", scale=1, variant="primary", min_width=70)
818
 
819
  # ── Branches + Head Map: side by side ──
 
702
  # ── Gradio UI ─────────────────────────────────────────────────────────────
703
  CSS = """
704
  /* ── Global tightening ── */
705
+ .gradio-container { max-width: 100% !important; padding: 6px 10px !important; }
706
+ .gradio-container .main { padding: 0 !important; gap: 4px !important; }
707
+ .gradio-container .gap, .gradio-container .form { gap: 4px !important; }
708
+ .gradio-container .block { padding: 3px !important; border-radius: 4px !important; }
709
  .gradio-container .gr-block { padding: 0 !important; }
710
+ .gradio-container .prose { margin: 0 !important; }
711
 
712
  /* ── Header: kill the giant title margins ── */
713
  #hdr h1 { font-size: 18px !important; margin: 0 !important; padding: 0 !important; line-height: 1.2 !important; }
 
800
  show_label=True)
801
  system_prompt = gr.Textbox(label="System", value="",
802
  lines=1, max_lines=3, scale=4, container=True)
803
+ user_prompt = gr.Textbox(
804
+ label="User",
805
+ value=("Hi, I need something like a cake recipe but it can't include eggs, sugar, "
806
+ "gluten-- so no flour, actually make that no grains of any sort, as well as "
807
+ "liquid and solid ingredients, none of them either. Thanks!"),
808
+ lines=1, max_lines=3, scale=5, container=True,
809
+ )
810
  load_btn = gr.Button("Load", variant="primary", scale=1, min_width=80)
811
 
812
  muted_html = gr.HTML(elem_id="muted-row")
 
816
  "<div class='pane-body'><i>Click <b>Load</b> to begin.</i></div></div>")
817
 
818
  # ── Command bar: directly under Context (eye scans context β†’ types command) ──
 
819
  with gr.Row(elem_id="cmdbar"):
820
+ cmd = gr.Textbox(
821
+ label="CMD",
822
+ placeholder=(
823
+ "1-N select branch Β· 1,5 select+keep Β· i <text> inject Β· "
824
+ "h *|h L|h L H scan Β· top R1,R2,… rank-pick Β· rew N Β· "
825
+ "spark <tok> [lo:hi] rank trace Β· w N Β· l N Β· mute L H Β· unmute L H|all Β· muted Β· r Β· s"
826
+ ),
827
+ scale=10, autofocus=True, lines=1, max_lines=1, container=True,
828
+ )
829
  run_btn = gr.Button("Run", scale=1, variant="primary", min_width=70)
830
 
831
  # ── Branches + Head Map: side by side ──