orionweller commited on
Commit
bbc46f9
1 Parent(s): 9bed19f
Files changed (1) hide show
  1. app.py +6 -11
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, who co-wrote the screenplay with Rick Jaffa and Amanda Silver."
85
  ],
86
  [
87
- "What are the health benefits of green tea?",
88
- "A relevant document would discuss specific health benefits associated with drinking green tea",
89
- "Green tea is rich in polyphenols, which are natural compounds that have health benefits, such as reducing inflammation and helping to fight cancer. Green tea contains a catechin called epigallocatechin-3-gallate (EGCG). Catechins are natural antioxidants that help prevent cell damage and provide other benefits."
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("# FollowIR Relevance Checker")
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():