Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from google import genai
|
| 3 |
from google.genai import types
|
| 4 |
-
from openai import OpenAI
|
| 5 |
|
| 6 |
# Show title and description.
|
| 7 |
st.title("💬 LSAT Tutor")
|
|
@@ -69,23 +68,6 @@ if prompt := st.chat_input("Ready to begin?"):
|
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
# stream = client.chat.completions.create(
|
| 75 |
-
# model="gpt-3.5-turbo",
|
| 76 |
-
# messages=[
|
| 77 |
-
# {"role": m["role"], "content": m["content"]}
|
| 78 |
-
# for m in st.session_state.messages
|
| 79 |
-
# ],
|
| 80 |
-
# stream=True,
|
| 81 |
-
# )
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
# import streamlit as st
|
| 87 |
-
# import random
|
| 88 |
-
# import time
|
| 89 |
|
| 90 |
|
| 91 |
# # Streamed response emulator
|
|
@@ -102,27 +84,3 @@ if prompt := st.chat_input("Ready to begin?"):
|
|
| 102 |
# time.sleep(0.05)
|
| 103 |
|
| 104 |
|
| 105 |
-
# st.title("Simple chat")
|
| 106 |
-
|
| 107 |
-
# # Initialize chat history
|
| 108 |
-
# if "messages" not in st.session_state:
|
| 109 |
-
# st.session_state.messages = []
|
| 110 |
-
|
| 111 |
-
# # Display chat messages from history on app rerun
|
| 112 |
-
# for message in st.session_state.messages:
|
| 113 |
-
# with st.chat_message(message["role"]):
|
| 114 |
-
# st.markdown(message["content"])
|
| 115 |
-
|
| 116 |
-
# # Accept user input
|
| 117 |
-
# if prompt := st.chat_input("What is up?"):
|
| 118 |
-
# # Add user message to chat history
|
| 119 |
-
# st.session_state.messages.append({"role": "user", "content": prompt})
|
| 120 |
-
# # Display user message in chat message container
|
| 121 |
-
# with st.chat_message("user"):
|
| 122 |
-
# st.markdown(prompt)
|
| 123 |
-
|
| 124 |
-
# # Display assistant response in chat message container
|
| 125 |
-
# with st.chat_message("assistant"):
|
| 126 |
-
# response = st.write_stream(response_generator())
|
| 127 |
-
# # Add assistant response to chat history
|
| 128 |
-
# st.session_state.messages.append({"role": "assistant", "content": response})
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from google import genai
|
| 3 |
from google.genai import types
|
|
|
|
| 4 |
|
| 5 |
# Show title and description.
|
| 6 |
st.title("💬 LSAT Tutor")
|
|
|
|
| 68 |
|
| 69 |
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
|
| 73 |
# # Streamed response emulator
|
|
|
|
| 84 |
# time.sleep(0.05)
|
| 85 |
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|