Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ if config and config_btn:
|
|
16 |
txt = crawl_the_site.crawl(start,limit)
|
17 |
collection = create_database.create_database(txt)
|
18 |
st.write("Crawling is done.")
|
|
|
19 |
|
20 |
openai_client = OpenAI(base_url="https://openrouter.ai/api/v1",api_key=api_key)
|
21 |
|
@@ -30,6 +31,7 @@ prompt = st.text_area("Enter a prompt (after the crawling is done):")
|
|
30 |
prompt_btn = st.button("Enter")
|
31 |
|
32 |
if prompt and prompt_btn:
|
|
|
33 |
results = collection.query(query_texts=[prompt],n_results=5)
|
34 |
infos = results["documents"][0]
|
35 |
|
|
|
16 |
txt = crawl_the_site.crawl(start,limit)
|
17 |
collection = create_database.create_database(txt)
|
18 |
st.write("Crawling is done.")
|
19 |
+
st.write(collection)
|
20 |
|
21 |
openai_client = OpenAI(base_url="https://openrouter.ai/api/v1",api_key=api_key)
|
22 |
|
|
|
31 |
prompt_btn = st.button("Enter")
|
32 |
|
33 |
if prompt and prompt_btn:
|
34 |
+
global collection
|
35 |
results = collection.query(query_texts=[prompt],n_results=5)
|
36 |
infos = results["documents"][0]
|
37 |
|