mehmet0001 commited on
Commit
b7e76a9
·
verified ·
1 Parent(s): 1a1b844

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -6,9 +6,9 @@ import streamlit as st
6
  api_key = "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"
7
 
8
  config = st.text_area("Enter the start URL and the limit of crawling (in this format : URL,limit):")
9
- btn = st.button("Start crawling!")
10
 
11
- if config and btn:
12
  start = config.split(",")[0]
13
  limit = int(config.split(",")[1])
14
 
@@ -27,8 +27,9 @@ prompt_template = """Answer the question only according to the information provi
27
  # {}"""
28
 
29
  prompt = st.text_area("Enter a prompt (after the crawling is done):")
 
30
 
31
- if prompt:
32
  results = collection.query(query_texts=[prompt],n_results=5)
33
  infos = results["documents"][0]
34
 
 
6
  api_key = "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"
7
 
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
+ if config and config_btn:
12
  start = config.split(",")[0]
13
  limit = int(config.split(",")[1])
14
 
 
27
  # {}"""
28
 
29
  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