Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- .gitattributes +1 -0
- 2023_GPT4All_Technical_Report.pdf +3 -0
- app.py +27 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
2023_GPT4All_Technical_Report.pdf filter=lfs diff=lfs merge=lfs -text
|
2023_GPT4All_Technical_Report.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bdeb65afa3fd518c796a605cd83686de3603b40290d9242e5bee430b8cbd2389
|
| 3 |
+
size 3651423
|
app.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from index import ask
|
| 3 |
+
|
| 4 |
+
st.title("💬 AI Chatbot")
|
| 5 |
+
|
| 6 |
+
# Initialize chat history
|
| 7 |
+
if "messages" not in st.session_state:
|
| 8 |
+
st.session_state.messages = []
|
| 9 |
+
|
| 10 |
+
# Display chat messages from history on app rerun
|
| 11 |
+
for message in st.session_state.messages:
|
| 12 |
+
with st.chat_message(message["role"]):
|
| 13 |
+
st.markdown(message["content"])
|
| 14 |
+
|
| 15 |
+
# React to user input
|
| 16 |
+
if prompt := st.chat_input("What is up?"):
|
| 17 |
+
# Display user message in chat message container
|
| 18 |
+
st.chat_message("human").markdown(prompt)
|
| 19 |
+
# Add user message to chat history
|
| 20 |
+
st.session_state.messages.append({"role": "user", "content": prompt})
|
| 21 |
+
|
| 22 |
+
response = ask(prompt)
|
| 23 |
+
# Display assistant response in chat message container
|
| 24 |
+
with st.chat_message("assistant"):
|
| 25 |
+
st.markdown(response)
|
| 26 |
+
# Add assistant response to chat history
|
| 27 |
+
st.session_state.messages.append({"role": "assistant", "content": response})
|