Spaces:
Build error
Build error
Merge the branch for synchronize the server files
Browse files- Procfile +1 -0
- setup.sh +18 -0
- src/chatbot_csv.py +1 -2
Procfile
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
web: sh setup.sh && streamlit run src/chatbot_csv.py
|
setup.sh
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
mkdir -p ~/.streamlit/
|
| 2 |
+
|
| 3 |
+
echo "\
|
| 4 |
+
[general]\n\
|
| 5 |
+
email = \"yyvannbarbotts@gmail.com\"\n\
|
| 6 |
+
" > ~/.streamlit/credentials.toml
|
| 7 |
+
|
| 8 |
+
echo "\
|
| 9 |
+
[server]\n\
|
| 10 |
+
headless = true\n\
|
| 11 |
+
enableCORS=false\n\
|
| 12 |
+
port = $PORT\n\
|
| 13 |
+
\n\
|
| 14 |
+
[theme]\n\
|
| 15 |
+
base = \"light\"\n\
|
| 16 |
+
backgroundColor = \"#FFF1F9\"\n\
|
| 17 |
+
secondaryBackgroundColor = \"#FFDCF1\"\n\
|
| 18 |
+
" > ~/.streamlit/config.toml
|
src/chatbot_csv.py
CHANGED
|
@@ -141,8 +141,7 @@ async def main():
|
|
| 141 |
qa_template = """"You are an AI conversational assistant to answer questions based on information from a csv file.
|
| 142 |
You are given data from a csv file and a question, you must help the user find the information they need.
|
| 143 |
Only give responses for information you know about. Don't try to make up an answer.
|
| 144 |
-
Your answers should be short
|
| 145 |
-
Respond to the user in the same language they are speaking to you in.
|
| 146 |
question: {question}
|
| 147 |
=========
|
| 148 |
{context}
|
|
|
|
| 141 |
qa_template = """"You are an AI conversational assistant to answer questions based on information from a csv file.
|
| 142 |
You are given data from a csv file and a question, you must help the user find the information they need.
|
| 143 |
Only give responses for information you know about. Don't try to make up an answer.
|
| 144 |
+
Your answers should be short,friendly, in the same language.
|
|
|
|
| 145 |
question: {question}
|
| 146 |
=========
|
| 147 |
{context}
|