reshinthadith commited on
Commit
73f5702
·
1 Parent(s): ac2194c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -11,6 +11,13 @@ with st.form("dataset_form"):
11
  st.markdown("## Question")
12
  st.text(dataset["train"]["prompt"][len_index])
13
  st.markdown("## Chosen")
14
- st.text(dataset["train"]["chosen"][len_index].split("Critique")[1])
15
- st.markdown("## Rejected")
16
- st.text(dataset["train"]["rejected"][len_index].split("Critique")[1])
 
 
 
 
 
 
 
 
11
  st.markdown("## Question")
12
  st.text(dataset["train"]["prompt"][len_index])
13
  st.markdown("## Chosen")
14
+ chosen_text = dataset["train"]["chosen"][len_index]
15
+ if "Critique" in chosen_text:
16
+ st.text(chosen_text.split("Critique")[1])
17
+ else:
18
+ st.text(chosen_text)
19
+ rejected_text = dataset["train"]["rejected"][len_index]
20
+ if "Critique" in rejected_text:
21
+ st.text(rejected_text.split("Critique")[1])
22
+ else:
23
+ st.text(rejected_text)