Spaces:
Sleeping
Sleeping
Allen Park
commited on
Commit
·
f9136ba
1
Parent(s):
1418604
add interface code to compare
Browse files
app.py
CHANGED
@@ -122,20 +122,20 @@ def model_call(question, document, answer, client_base_url):
|
|
122 |
combined_reasoning = " ".join(reasoning)[1:-1]
|
123 |
return combined_reasoning, score
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
|
135 |
with gr.Blocks() as demo:
|
136 |
base_url_state = gr.State(update_client_base_url("Patronus Lynx 8B"))
|
137 |
gr.Markdown(HEADER)
|
138 |
-
|
139 |
model_dropdown = gr.Dropdown(choices=["Patronus Lynx 8B", "Patronus Lynx 70B"], value="Patronus Lynx 8B", label="Model", interactive=True)
|
140 |
with gr.Row():
|
141 |
with gr.Column(scale=1):
|
|
|
122 |
combined_reasoning = " ".join(reasoning)[1:-1]
|
123 |
return combined_reasoning, score
|
124 |
|
125 |
+
inputs = [
|
126 |
+
gr.Textbox(label="Question"),
|
127 |
+
gr.Textbox(label="Document"),
|
128 |
+
gr.Textbox(label="Answer")
|
129 |
+
]
|
130 |
+
outputs = [
|
131 |
+
gr.Textbox(label="Reasoning"),
|
132 |
+
gr.Textbox(label="Score")
|
133 |
+
]
|
134 |
|
135 |
with gr.Blocks() as demo:
|
136 |
base_url_state = gr.State(update_client_base_url("Patronus Lynx 8B"))
|
137 |
gr.Markdown(HEADER)
|
138 |
+
gr.Interface(fn=model_call, inputs=inputs, outputs=outputs)
|
139 |
model_dropdown = gr.Dropdown(choices=["Patronus Lynx 8B", "Patronus Lynx 70B"], value="Patronus Lynx 8B", label="Model", interactive=True)
|
140 |
with gr.Row():
|
141 |
with gr.Column(scale=1):
|