Spaces:
Runtime error
Runtime error
Vipul Swarup commited on
Commit ·
2911f0c
1
Parent(s): 4f9b34e
Added large text area
Browse files
app.py
CHANGED
|
@@ -29,17 +29,15 @@ def load_answer(question):
|
|
| 29 |
st.session_state.sessionMessages.append(HumanMessage(content=question))
|
| 30 |
assistant_answer = chat(st.session_state.sessionMessages)
|
| 31 |
st.session_state.sessionMessages.append(AIMessage(content=assistant_answer.content))
|
| 32 |
-
# llm = OpenAI(model_name="gpt-3.5-turbo",temperature=1)
|
| 33 |
-
# answer=llm(question)
|
| 34 |
return assistant_answer.content
|
| 35 |
|
| 36 |
|
| 37 |
#Gets the user input
|
| 38 |
def get_text():
|
| 39 |
-
input_text = st.
|
| 40 |
return input_text
|
| 41 |
|
| 42 |
-
chat = ChatOpenAI(temperature=0)
|
| 43 |
|
| 44 |
user_input=get_text()
|
| 45 |
|
|
|
|
| 29 |
st.session_state.sessionMessages.append(HumanMessage(content=question))
|
| 30 |
assistant_answer = chat(st.session_state.sessionMessages)
|
| 31 |
st.session_state.sessionMessages.append(AIMessage(content=assistant_answer.content))
|
|
|
|
|
|
|
| 32 |
return assistant_answer.content
|
| 33 |
|
| 34 |
|
| 35 |
#Gets the user input
|
| 36 |
def get_text():
|
| 37 |
+
input_text = st.text_area("Paste a JSON file here, with the following keys: (1) The name of the common core standard, (2) The student's area of interest.\n E.g. {\n cc-standard: 'CCSS.ELA-LITERACY.W.4.9', \n area-of-interest: 'Baseball' \n } ", key="input")
|
| 38 |
return input_text
|
| 39 |
|
| 40 |
+
chat = ChatOpenAI(temperature=0, model_name="gpt-4")
|
| 41 |
|
| 42 |
user_input=get_text()
|
| 43 |
|