Spaces:
Sleeping
Sleeping
Update ui/app.py
Browse files
ui/app.py
CHANGED
|
@@ -14,7 +14,13 @@ n = st.number_input("Number of results:", min_value=1, max_value=20, value=5)
|
|
| 14 |
|
| 15 |
if st.button("Search"):
|
| 16 |
search_method = use_pinecone == 'Pinecone Vector Search'
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
json={"query": query, "n": n, "use_pinecone": search_method})
|
| 19 |
|
| 20 |
# Log the response for debugging
|
|
|
|
| 14 |
|
| 15 |
if st.button("Search"):
|
| 16 |
search_method = use_pinecone == 'Pinecone Vector Search'
|
| 17 |
+
# for local use:
|
| 18 |
+
# response = requests.post("http://localhost:5000/search",
|
| 19 |
+
# json={"query": query, "n": n, "use_pinecone": search_method})
|
| 20 |
+
|
| 21 |
+
# for hf spaces:
|
| 22 |
+
backend_url = "https://supertskone-prompt-search-engine.hf.space/search"
|
| 23 |
+
response = requests.post(backend_url,
|
| 24 |
json={"query": query, "n": n, "use_pinecone": search_method})
|
| 25 |
|
| 26 |
# Log the response for debugging
|