Spaces:
Sleeping
Sleeping
Vasundhhara
commited on
Commit
•
f8357db
1
Parent(s):
06019c5
Update app.py
Browse files
app.py
CHANGED
@@ -8,15 +8,35 @@ import requests
|
|
8 |
|
9 |
st.title('Hushh-emails')
|
10 |
|
11 |
-
st.write("Enter your query")
|
12 |
-
gmail_query= st.text_input("Query")
|
13 |
|
14 |
-
if st.button('Login to your google account'):
|
15 |
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
if st.button('Download resumes'):
|
20 |
-
|
21 |
-
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
st.title('Hushh-emails')
|
10 |
|
11 |
+
# st.write("Enter your query")
|
12 |
+
# gmail_query= st.text_input("Query")
|
13 |
|
14 |
+
# if st.button('Login to your google account'):
|
15 |
|
16 |
+
# #requests.get(url= "http://127.0.0.1:8000/login/google")
|
17 |
+
# requests.get(url="https://hushh-hushh-jobs-emails.hf.space/login/google")
|
18 |
|
19 |
+
# if st.button('Download resumes'):
|
20 |
+
# #requests.get(url=f"http://127.0.0.1:8000/download/google?q={gmail_query}")
|
21 |
+
# requests.get(url=f"https://hushh-hushh-jobs-emails.hf.space/download/google?q={gmail_query}")
|
22 |
|
23 |
+
|
24 |
+
gmail_query= st.text_input("Enter your Gmail Query")
|
25 |
+
|
26 |
+
if 'clicked' not in st.session_state:
|
27 |
+
st.session_state.clicked = False
|
28 |
+
|
29 |
+
def login_button():
|
30 |
+
requests.get(url= "http://127.0.0.1:8000/login/google")
|
31 |
+
st.session_state.clicked=True
|
32 |
+
|
33 |
+
|
34 |
+
if st.button('Login using google',on_click=login_button):
|
35 |
+
st.success('Login Successful !!')
|
36 |
+
st.success('Proceed to download the resumes ...')
|
37 |
+
|
38 |
+
|
39 |
+
if st.session_state.clicked:
|
40 |
+
if st.button('Download Resumes'):
|
41 |
+
requests.get(url=f"http://127.0.0.1:8000/download/google?q={gmail_query}")
|
42 |
+
|