Spaces:
Sleeping
Sleeping
Ouz
commited on
Commit
·
24dc9b8
1
Parent(s):
2778ce4
Pre-filled example
Browse files
app.py
CHANGED
@@ -70,12 +70,23 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="blue")) as demo:
|
|
70 |
with gr.Row():
|
71 |
# Left column
|
72 |
with gr.Column():
|
73 |
-
user_input = gr.Textbox(
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
evaluator_dropdown = gr.Dropdown(
|
76 |
label="🔎 Select Evaluator",
|
77 |
-
choices=
|
78 |
-
interactive=True
|
|
|
79 |
)
|
80 |
|
81 |
# Right column
|
@@ -87,7 +98,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="blue")) as demo:
|
|
87 |
api_key.change(
|
88 |
fn=initialize_client,
|
89 |
inputs=[api_key],
|
90 |
-
outputs=[evaluator_dropdown
|
91 |
)
|
92 |
|
93 |
# Button to trigger the process
|
|
|
70 |
with gr.Row():
|
71 |
# Left column
|
72 |
with gr.Column():
|
73 |
+
user_input = gr.Textbox(
|
74 |
+
label="👤 User Instruction or Question (Optional)",
|
75 |
+
placeholder="Enter user input here...",
|
76 |
+
value="Where can I apply to this position?",
|
77 |
+
interactive=True
|
78 |
+
)
|
79 |
+
llm_response = gr.Textbox(
|
80 |
+
label="🤖 LLM Response (to be evaluated)",
|
81 |
+
placeholder="Enter the LLM response to be evaluated here...",
|
82 |
+
value="You can find the instructions from our Careers page.",
|
83 |
+
interactive=True
|
84 |
+
)
|
85 |
evaluator_dropdown = gr.Dropdown(
|
86 |
label="🔎 Select Evaluator",
|
87 |
+
choices=ROOT_EVALUATORS,
|
88 |
+
interactive=True,
|
89 |
+
value="Politeness",
|
90 |
)
|
91 |
|
92 |
# Right column
|
|
|
98 |
api_key.change(
|
99 |
fn=initialize_client,
|
100 |
inputs=[api_key],
|
101 |
+
outputs=[] # Remove evaluator_dropdown from outputs
|
102 |
)
|
103 |
|
104 |
# Button to trigger the process
|