Spaces:
Running
on
Zero
Running
on
Zero
orionweller
commited on
Commit
•
bbc46f9
1
Parent(s):
9bed19f
fix
Browse files
app.py
CHANGED
@@ -80,24 +80,19 @@ def check_relevance(query, instruction, passage):
|
|
80 |
examples = [
|
81 |
[
|
82 |
"What movies were directed by James Cameron?",
|
83 |
-
"A relevant document would describe any movie that was directed by James Cameron",
|
84 |
-
"Avatar: The Way of Water is a 2022 American epic science fiction film co-produced and directed by James Cameron
|
85 |
],
|
86 |
[
|
87 |
-
"What
|
88 |
-
"A relevant document would
|
89 |
-
"
|
90 |
-
],
|
91 |
-
[
|
92 |
-
"Who won the Nobel Prize in Physics in 2022?",
|
93 |
-
"A relevant document would mention the names of the physicists who won the Nobel Prize in Physics in 2022",
|
94 |
-
"The 2021 Nobel Prize in Physics was awarded jointly to Syukuro Manabe, Klaus Hasselmann and Giorgio Parisi for groundbreaking contributions to our understanding of complex physical systems."
|
95 |
]
|
96 |
]
|
97 |
|
98 |
# Gradio Interface
|
99 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
100 |
-
gr.Markdown("#
|
101 |
gr.Markdown("This app uses the FollowIR-7B model to determine the relevance of a passage to a given query and instruction.")
|
102 |
|
103 |
with gr.Row():
|
|
|
80 |
examples = [
|
81 |
[
|
82 |
"What movies were directed by James Cameron?",
|
83 |
+
"A relevant document would describe any movie that was directed by James Cameron but not any that are co-directed.",
|
84 |
+
"Avatar: The Way of Water is a 2022 American epic science fiction film co-produced and co-directed by James Cameron and Rick Jaffe."
|
85 |
],
|
86 |
[
|
87 |
+
"What movies were directed by James Cameron?",
|
88 |
+
"A relevant document would describe any movie that was directed by James Cameron but not any that are co-directed.",
|
89 |
+
"Avatar: The Way of Water is a 2022 American epic science fiction film co-produced and directed by James Cameron. Rick Jaffe helped write the script."
|
|
|
|
|
|
|
|
|
|
|
90 |
]
|
91 |
]
|
92 |
|
93 |
# Gradio Interface
|
94 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
95 |
+
gr.Markdown("# Relevance Using Instructions")
|
96 |
gr.Markdown("This app uses the FollowIR-7B model to determine the relevance of a passage to a given query and instruction.")
|
97 |
|
98 |
with gr.Row():
|