Spaces:
Runtime error
Runtime error
fix: update theme
Browse files
app.py
CHANGED
|
@@ -109,6 +109,24 @@ css = """
|
|
| 109 |
}
|
| 110 |
"""
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
def format_string(retrieved_context, user_input, model_output, gold_answer):
|
| 113 |
parts = []
|
| 114 |
if retrieved_context:
|
|
@@ -158,7 +176,7 @@ def model_call(model_output, user_input, gold_answer, retrieved_context, pass_cr
|
|
| 158 |
def select_template(template):
|
| 159 |
return template["model_output"], template["user_input"], template["gold_answer"], template["retrieved_context"], template["pass_criteria"], template["rubric"]
|
| 160 |
|
| 161 |
-
with gr.Blocks(css=css, theme=
|
| 162 |
gr.Markdown(HEADER)
|
| 163 |
with gr.Row(equal_height=True):
|
| 164 |
with gr.Column(scale=1):
|
|
|
|
| 109 |
}
|
| 110 |
"""
|
| 111 |
|
| 112 |
+
theme = gr.themes.Default(
|
| 113 |
+
spacing_size="sm",
|
| 114 |
+
font=[gr.themes.GoogleFont("Plus Jakarta Sans"), "Arial", "sans-serif"],
|
| 115 |
+
primary_hue="indigo",
|
| 116 |
+
secondary_hue="purple"
|
| 117 |
+
).set(
|
| 118 |
+
background_fill_primary="""
|
| 119 |
+
radial-gradient(circle at 75% 25%,
|
| 120 |
+
rgba(91, 104, 223, 0.3) -1.01%,
|
| 121 |
+
rgba(55, 62, 134, 0.3) 66.48%,
|
| 122 |
+
rgba(49, 56, 121, 0.3) 66.49%
|
| 123 |
+
)
|
| 124 |
+
""",
|
| 125 |
+
background={
|
| 126 |
+
"filter": "blur(273.5px)",
|
| 127 |
+
"border-radius": "2689px"
|
| 128 |
+
})
|
| 129 |
+
|
| 130 |
def format_string(retrieved_context, user_input, model_output, gold_answer):
|
| 131 |
parts = []
|
| 132 |
if retrieved_context:
|
|
|
|
| 176 |
def select_template(template):
|
| 177 |
return template["model_output"], template["user_input"], template["gold_answer"], template["retrieved_context"], template["pass_criteria"], template["rubric"]
|
| 178 |
|
| 179 |
+
with gr.Blocks(css=css, theme=theme) as demo:
|
| 180 |
gr.Markdown(HEADER)
|
| 181 |
with gr.Row(equal_height=True):
|
| 182 |
with gr.Column(scale=1):
|