reshinthadith commited on
Commit
08fba49
1 Parent(s): 978a545

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from datasets import load_dataset
3
+
4
+ dataset = load_dataset("reshinthadith/pairwise-code-review-instruct-critique-revision-python")
5
+ total_length = len(dataset)
6
+
7
+ st.title('Pairwise Comparison')
8
+ with st.form("dataset_form"):
9
+ len_index = st.slider('Dataset Index', 0, total_length,0)
10
+ if st.form_submit_button("Load"):
11
+ st.text("Question")
12
+ st.markdown(dataset["train"]["prompt"][len_index])
13
+ st.text("Chosen")
14
+ st.markdown(dataset["train"]["chosen"][len_index])
15
+ st.text("Rejected")
16
+ st.markdown(dataset["train"]["rejected"][len_index])