Spaces:
Sleeping
Sleeping
grapplerulrich
commited on
Commit
·
8fe785d
1
Parent(s):
96538e7
Remove old code
Browse files- beautiful_soup/requirements.txt +0 -1
- google-search/app.py +0 -31
- google-search/requirements.txt +0 -4
beautiful_soup/requirements.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
beautifulsoup4
|
|
|
|
google-search/app.py
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
from dotenv import load_dotenv
|
3 |
-
from googleapiclient.discovery import build
|
4 |
-
import os
|
5 |
-
|
6 |
-
def main():
|
7 |
-
load_dotenv()
|
8 |
-
st.title('Google Search')
|
9 |
-
query = st.text_input('Search query')
|
10 |
-
|
11 |
-
api_key = os.getenv('GOOGLE_SEARCH_API_KEY')
|
12 |
-
service = build(
|
13 |
-
"customsearch",
|
14 |
-
"v1",
|
15 |
-
developerKey=api_key
|
16 |
-
)
|
17 |
-
|
18 |
-
if ( query ):
|
19 |
-
results = service.cse().list(
|
20 |
-
q=query,
|
21 |
-
cx='05048cc2df6134a06',
|
22 |
-
).execute()
|
23 |
-
|
24 |
-
try:
|
25 |
-
for item in results['items']:
|
26 |
-
st.write(item['link'])
|
27 |
-
except Exception as e:
|
28 |
-
st.exception(e)
|
29 |
-
|
30 |
-
if __name__ == '__main__':
|
31 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
google-search/requirements.txt
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
streamlit
|
2 |
-
google
|
3 |
-
python-dotenv
|
4 |
-
beautifulsoup4
|
|
|
|
|
|
|
|
|
|