File size: 973 Bytes
b551488
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st
import json

# answers = json.load(open('prompting/prompt_gpt3.5_turbo.json', 'r'))
answers = json.load(open('prompting/prompt_text-davinci-003.json', 'r'))
# claude_answers = json.load(open('prompting/prompt_claude.json', 'r'))

def escape_markdown(orig_string):
    return orig_string.replace('$', '\$')

question_idx = st.selectbox(f"Which question would you like to see?", range(len(answers)))

question = answers[question_idx]
st.header(f"Question {question_idx}")
q, q_s = st.columns(2)
with q:
    st.subheader(f"Original question (FK={question['original_fk']}):")
    st.write(escape_markdown(question['question']))
    st.subheader('Answer:')
    st.write(escape_markdown(question['original_answer']))
with q_s:
    st.subheader(f"Simplified Question (FK={question['simplified_fk']})")
    st.write(escape_markdown(question['simplified_question']))
    st.subheader('Answer:')
    st.write(escape_markdown(question['simplified_q_answer']))