Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -21,13 +21,17 @@ def download_content(url):
|
|
| 21 |
return response.text
|
| 22 |
|
| 23 |
st.title("Search and Download")
|
|
|
|
| 24 |
query = st.text_input("Enter your query (e.g. beds)")
|
| 25 |
url = st.text_input("Enter the URL to search from (e.g. https://www.daraz.com.np/)")
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
link = google_search(query, url)
|
| 28 |
if link:
|
| 29 |
-
st.write("First result:
|
| 30 |
-
|
|
|
|
| 31 |
content = download_content(link)
|
| 32 |
st.download_button("Download", content, file_name="content.html")
|
| 33 |
else:
|
|
|
|
| 21 |
return response.text
|
| 22 |
|
| 23 |
st.title("Search and Download")
|
| 24 |
+
|
| 25 |
query = st.text_input("Enter your query (e.g. beds)")
|
| 26 |
url = st.text_input("Enter the URL to search from (e.g. https://www.daraz.com.np/)")
|
| 27 |
+
search_button = st.button("Search")
|
| 28 |
+
|
| 29 |
+
if search_button:
|
| 30 |
link = google_search(query, url)
|
| 31 |
if link:
|
| 32 |
+
st.write(f"First result: {link}")
|
| 33 |
+
download_button = st.button("Download Content")
|
| 34 |
+
if download_button:
|
| 35 |
content = download_content(link)
|
| 36 |
st.download_button("Download", content, file_name="content.html")
|
| 37 |
else:
|