Spaces:
Sleeping
Sleeping
Commit
·
d231d5c
1
Parent(s):
b3b3063
add examples
Browse files
app.py
CHANGED
|
@@ -183,7 +183,7 @@ def gradio_interface(dataset, postfix):
|
|
| 183 |
print(f"Loading dataset: {dataset}")
|
| 184 |
load_corpus_embeddings(dataset)
|
| 185 |
load_queries(dataset)
|
| 186 |
-
|
| 187 |
return run_evaluation(dataset, postfix)
|
| 188 |
|
| 189 |
|
|
@@ -198,6 +198,10 @@ iface = gr.Interface(
|
|
| 198 |
outputs=gr.JSON(label="Evaluation Results"),
|
| 199 |
title="Promptriever Demo",
|
| 200 |
description="Select a dataset and enter a prompt to evaluate the model's performance. Note: it takes about **ten seconds** to evaluate.",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
)
|
| 202 |
|
| 203 |
# Launch the interface
|
|
|
|
| 183 |
print(f"Loading dataset: {dataset}")
|
| 184 |
load_corpus_embeddings(dataset)
|
| 185 |
load_queries(dataset)
|
| 186 |
+
|
| 187 |
return run_evaluation(dataset, postfix)
|
| 188 |
|
| 189 |
|
|
|
|
| 198 |
outputs=gr.JSON(label="Evaluation Results"),
|
| 199 |
title="Promptriever Demo",
|
| 200 |
description="Select a dataset and enter a prompt to evaluate the model's performance. Note: it takes about **ten seconds** to evaluate.",
|
| 201 |
+
examples=[
|
| 202 |
+
["scifact", ""],
|
| 203 |
+
["scifact", "When judging the relevance of a document, focus on the pragmatics of the query and consider irrelevant any documents for which the user would have used a different query."]
|
| 204 |
+
]
|
| 205 |
)
|
| 206 |
|
| 207 |
# Launch the interface
|