JPBianchi commited on
Commit
5313c77
1 Parent(s): 0bdccc2

added alpha slider into 'show metrics'

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -277,9 +277,9 @@ def main():
277
  # we could make it dependent on the model
278
  reranker_topk = 3
279
 
280
- rag_it = st.toggle('RAG it', True)
281
  if rag_it:
282
- st.write(f"Using LLM '{model_nameGPT}'")
283
  llm_temperature = st.slider(label='LLM T˚', min_value=0.0, max_value=2.0, value=0.01, step=0.10 )
284
 
285
  model_name_or_path = st.selectbox(label='Model Name:', options=available_models,
@@ -349,12 +349,15 @@ def main():
349
  with c1:
350
  show_metrics = st.button('Show Metrics on Golden set')
351
  if show_metrics:
 
 
 
352
  # _, center, _ = st.columns([3, 5, 3])
353
  # with center:
354
  # st.text("Metrics")
355
  with c2:
356
  with st.spinner(''):
357
- metrics = execute_evaluation(golden_dataset, class_name, client, alpha=alpha_input)
358
  with c1:
359
  kw_hit_rate = metrics['kw_hit_rate']
360
  kw_mrr = metrics['kw_mrr']
 
277
  # we could make it dependent on the model
278
  reranker_topk = 3
279
 
280
+ rag_it = st.toggle(f"RAG it with '{model_nameGPT}'", True)
281
  if rag_it:
282
+ # st.write(f"Using LLM '{model_nameGPT}'")
283
  llm_temperature = st.slider(label='LLM T˚', min_value=0.0, max_value=2.0, value=0.01, step=0.10 )
284
 
285
  model_name_or_path = st.selectbox(label='Model Name:', options=available_models,
 
349
  with c1:
350
  show_metrics = st.button('Show Metrics on Golden set')
351
  if show_metrics:
352
+ # we must add it because the hybrid search toggle could hide it
353
+ alpha_input2 = st.slider(label='Alpha',min_value=0.00, max_value=1.00, value=0.40, step=0.05)
354
+
355
  # _, center, _ = st.columns([3, 5, 3])
356
  # with center:
357
  # st.text("Metrics")
358
  with c2:
359
  with st.spinner(''):
360
+ metrics = execute_evaluation(golden_dataset, class_name, client, alpha=alpha_input2)
361
  with c1:
362
  kw_hit_rate = metrics['kw_hit_rate']
363
  kw_mrr = metrics['kw_mrr']