Spaces:
Runtime error
Runtime error
frankaging
commited on
Commit
·
d0c3da4
1
Parent(s):
f0c4e9b
claude impl
Browse files
app.py
CHANGED
|
@@ -170,7 +170,7 @@ def update_dropdown_choices(search_text):
|
|
| 170 |
filtered = filter_concepts(search_text)
|
| 171 |
return gr.update(choices=filtered)
|
| 172 |
|
| 173 |
-
with gr.Blocks(
|
| 174 |
# Remove default subspaces
|
| 175 |
selected_subspaces = gr.State([])
|
| 176 |
|
|
@@ -183,6 +183,7 @@ with gr.Blocks(fill_height=True) as demo:
|
|
| 183 |
description="Steer responses by selecting concepts on the right →",
|
| 184 |
type="messages",
|
| 185 |
additional_inputs=[selected_subspaces],
|
|
|
|
| 186 |
)
|
| 187 |
|
| 188 |
# Right side: concept management
|
|
@@ -194,6 +195,7 @@ with gr.Blocks(fill_height=True) as demo:
|
|
| 194 |
search_box = gr.Textbox(
|
| 195 |
label="Search Concepts",
|
| 196 |
placeholder="Find concepts to steer the model (e.g. 'time travel')",
|
|
|
|
| 197 |
)
|
| 198 |
concept_dropdown = gr.Dropdown(
|
| 199 |
label="Select a Concept",
|
|
|
|
| 170 |
filtered = filter_concepts(search_text)
|
| 171 |
return gr.update(choices=filtered)
|
| 172 |
|
| 173 |
+
with gr.Blocks(css="style.css") as demo:
|
| 174 |
# Remove default subspaces
|
| 175 |
selected_subspaces = gr.State([])
|
| 176 |
|
|
|
|
| 183 |
description="Steer responses by selecting concepts on the right →",
|
| 184 |
type="messages",
|
| 185 |
additional_inputs=[selected_subspaces],
|
| 186 |
+
fill_height=True
|
| 187 |
)
|
| 188 |
|
| 189 |
# Right side: concept management
|
|
|
|
| 195 |
search_box = gr.Textbox(
|
| 196 |
label="Search Concepts",
|
| 197 |
placeholder="Find concepts to steer the model (e.g. 'time travel')",
|
| 198 |
+
lines=2,
|
| 199 |
)
|
| 200 |
concept_dropdown = gr.Dropdown(
|
| 201 |
label="Select a Concept",
|
style.css
DELETED
|
@@ -1,22 +0,0 @@
|
|
| 1 |
-
/* h1 {
|
| 2 |
-
text-align: center;
|
| 3 |
-
display: block;
|
| 4 |
-
}
|
| 5 |
-
|
| 6 |
-
#duplicate-button {
|
| 7 |
-
margin: auto;
|
| 8 |
-
color: white;
|
| 9 |
-
background: #1565c0;
|
| 10 |
-
border-radius: 100vh;
|
| 11 |
-
}
|
| 12 |
-
|
| 13 |
-
.contain {
|
| 14 |
-
max-width: 900px;
|
| 15 |
-
margin: auto;
|
| 16 |
-
padding-top: 1.5rem;
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
.gr-column:nth-child(1),
|
| 20 |
-
.gr-column:nth-child(2) {
|
| 21 |
-
min-height: 500px;
|
| 22 |
-
} */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|