mehmet0001 commited on
Commit
afb3636
·
verified ·
1 Parent(s): 943de8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -8,16 +8,11 @@ api_key = "sk-or-v1-5b41e7106feb9b982d4ef5a6aa0959993387ba2e5fc9830df1279418776e
8
  config = st.text_area("Enter the start URL and the limit of crawling (in this format : URL,limit):")
9
  config_btn = st.button("Start crawling!")
10
 
11
- collection = None
12
- if config and config_btn:
13
- global collection
14
- start = config.split(",")[0]
15
- limit = int(config.split(",")[1])
16
-
17
- txt = crawl_the_site.crawl(start,limit)
18
- collection = create_database.create_database(txt)
19
- st.write("Crawling is done.")
20
- st.write(collection)
21
 
22
  openai_client = OpenAI(base_url="https://openrouter.ai/api/v1",api_key=api_key)
23
 
 
8
  config = st.text_area("Enter the start URL and the limit of crawling (in this format : URL,limit):")
9
  config_btn = st.button("Start crawling!")
10
 
11
+ start = "https://sern.dev/v4/cli/about/"
12
+ limit = 10
13
+
14
+ txt = crawl_the_site.crawl(start,limit)
15
+ collection = create_database.create_database(txt)
 
 
 
 
 
16
 
17
  openai_client = OpenAI(base_url="https://openrouter.ai/api/v1",api_key=api_key)
18