Spaces:
Running
Running
File size: 1,849 Bytes
58e78d3 13ba238 87f5105 13ba238 250af9b 87f5105 250af9b 13ba238 87f5105 aad2007 87f5105 aad2007 87f5105 13ba238 aad2007 87f5105 13ba238 aad2007 87f5105 aad2007 13ba238 87f5105 13ba238 aad2007 87f5105 13ba238 87f5105 13ba238 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
import streamlit as st
import pandas as pd
def load_data():
return pd.read_csv("benchmark_data.csv")
def case_insensitive_search(data, query, column):
if query:
return data[data[column].str.lower().str.contains(query.lower())]
return data
def display_table(data, rows_per_page=10):
container = st.container()
with container:
height = min(40 + rows_per_page * 38, 800)
st.dataframe(data, height=height)
def main():
st.title("Multihop-RAG Benchmark Space")
data = load_data()
st.sidebar.header("Search Options")
chat_model_query = st.sidebar.text_input("Search by Chat Model")
embedding_model_query = st.sidebar.text_input("Search by Embedding Model")
chunk_query = st.sidebar.text_input("Search by Chunk")
if chat_model_query:
data = case_insensitive_search(data, chat_model_query, 'chat_model')
if embedding_model_query:
data = case_insensitive_search(data, embedding_model_query, 'embedding_model')
if chunk_query:
data = case_insensitive_search(data, chunk_query, 'chunk')
st.header("Benchmark Results")
st.write("Displaying results for MRR@10, Hit@10, and Accuracy across different frameworks, embedding models, chat models, and chunks.")
display_table(data)
if st.sidebar.checkbox("Show Metrics Distribution"):
st.subheader("Metrics Distribution")
st.bar_chart(data[['MRR@10', 'Hit@10', 'Accuracy']])
st.sidebar.header("Citation")
st.sidebar.info(
"Please cite this dataset as:\n"
"Author et al. (2024). Multihop-RAG Benchmark Dataset. Retrieved from [Source URL]."
)
st.markdown("---")
st.caption("For citation, please use: 'Author et al. (2024), Multihop-RAG Benchmark Dataset, Retrieved from [Source URL].'")
if __name__ == "__main__":
main() |