Spaces:
Sleeping
Sleeping
Allen Park
commited on
Commit
·
6d1bb98
1
Parent(s):
2ca5664
add class for example button
Browse files
app.py
CHANGED
@@ -97,6 +97,15 @@ HEADER = """
|
|
97 |
|
98 |
UPLOADABLE_FILE_TYPES = [".pdf", ".txt", ".docx", ".doc"]
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
def update_client_base_url(model_name):
|
101 |
if model_name == "Patronus Lynx 8B v1.1":
|
102 |
return "https://yb15a7dy-patronus-lynx-8b-v1-1.tin.lepton.run/api/v1/"
|
@@ -217,7 +226,7 @@ with gr.Blocks(theme=gr.themes.Default(font=[gr.themes.GoogleFont("Plus Jakarta
|
|
217 |
score = gr.Textbox(label="Score (FAIL if Hallucinated, PASS if not)")
|
218 |
with gr.Row():
|
219 |
for idx, example in enumerate(EXAMPLES):
|
220 |
-
template_btn = gr.Button(f"{example['emoji']} {example['question']}")
|
221 |
template_btn.click(
|
222 |
fn=select_template,
|
223 |
inputs=[gr.State(example)],
|
|
|
97 |
|
98 |
UPLOADABLE_FILE_TYPES = [".pdf", ".txt", ".docx", ".doc"]
|
99 |
|
100 |
+
css = """
|
101 |
+
.example-button {
|
102 |
+
font-size: .75rem;
|
103 |
+
background-color: #fff;
|
104 |
+
border: 1px solid purple;
|
105 |
+
color: purple;
|
106 |
+
}
|
107 |
+
"""
|
108 |
+
|
109 |
def update_client_base_url(model_name):
|
110 |
if model_name == "Patronus Lynx 8B v1.1":
|
111 |
return "https://yb15a7dy-patronus-lynx-8b-v1-1.tin.lepton.run/api/v1/"
|
|
|
226 |
score = gr.Textbox(label="Score (FAIL if Hallucinated, PASS if not)")
|
227 |
with gr.Row():
|
228 |
for idx, example in enumerate(EXAMPLES):
|
229 |
+
template_btn = gr.Button(f"{example['emoji']} {example['question']}", elem_classes="example-button")
|
230 |
template_btn.click(
|
231 |
fn=select_template,
|
232 |
inputs=[gr.State(example)],
|