mehmet0001 commited on
Commit
a35f127
·
verified ·
1 Parent(s): b1cc502

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -24,14 +24,15 @@ if st.session_state.stage == "crawl-input":
24
  config = st.text_area("Enter the start URL and the limit of crawling (in this format : URL,limit):")
25
  config_btn = st.button("Start crawling!")
26
 
27
- if config and config_btn and not (st.session_state.stage == "remove-crawl"):
28
- start = config.split(",")[0]
29
- limit = int(config.split(",")[1])
30
-
31
- txt = crawl_the_site.crawl(start,limit)
32
- st.session_state.collection = create_database.create_database(txt)
33
- st.write("Crawling is done.")
34
- st.session_state.stage = "remove-crawl"
 
35
 
36
  if st.session_state.stage == "prompt-input":
37
  prompt = st.text_area("Ask the documentation a question :")
 
24
  config = st.text_area("Enter the start URL and the limit of crawling (in this format : URL,limit):")
25
  config_btn = st.button("Start crawling!")
26
 
27
+ if not (st.session_state.stage == "remove-crawl"):
28
+ if config and config_btn:
29
+ start = config.split(",")[0]
30
+ limit = int(config.split(",")[1])
31
+
32
+ txt = crawl_the_site.crawl(start,limit)
33
+ st.session_state.collection = create_database.create_database(txt)
34
+ st.write("Crawling is done.")
35
+ st.session_state.stage = "remove-crawl"
36
 
37
  if st.session_state.stage == "prompt-input":
38
  prompt = st.text_area("Ask the documentation a question :")