EdAI / app.py
celinelee's picture
Create app.py
b551488
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']))