Spaces:
Runtime error
Runtime error
nicoladisabato
commited on
Commit
·
581d78f
1
Parent(s):
3b6496c
Update app.py
Browse files
app.py
CHANGED
@@ -35,11 +35,11 @@ input_url = st.sidebar.text_input("Inserisci url:")
|
|
35 |
load_dotenv()
|
36 |
|
37 |
|
38 |
-
st.title("
|
39 |
|
40 |
|
41 |
|
42 |
-
question = st.text_area("
|
43 |
|
44 |
#generate the main prompt
|
45 |
prompt_template = """Intruction: You are a website agent that is talking with a human. Use only the chat history and the following information:
|
@@ -94,7 +94,7 @@ if st.button("Invia", type="primary"):
|
|
94 |
documents=docs,
|
95 |
embedding=openai_embeddings)
|
96 |
|
97 |
-
retriever = vectordb.as_retriever(search_kwargs={"k":
|
98 |
|
99 |
relevant_docs = retriever.get_relevant_documents(question)
|
100 |
|
|
|
35 |
load_dotenv()
|
36 |
|
37 |
|
38 |
+
st.title("Chat with your website 🤖")
|
39 |
|
40 |
|
41 |
|
42 |
+
question = st.text_area("Ask here:")
|
43 |
|
44 |
#generate the main prompt
|
45 |
prompt_template = """Intruction: You are a website agent that is talking with a human. Use only the chat history and the following information:
|
|
|
94 |
documents=docs,
|
95 |
embedding=openai_embeddings)
|
96 |
|
97 |
+
retriever = vectordb.as_retriever(search_kwargs={"k": 2})
|
98 |
|
99 |
relevant_docs = retriever.get_relevant_documents(question)
|
100 |
|