File size: 1,236 Bytes
5037288
 
 
 
 
 
 
 
 
 
f8357db
 
5037288
f8357db
5037288
f8357db
 
5037288
f8357db
 
 
5037288
f8357db
 
 
 
 
 
 
bf13d74
f8357db
 
 
 
 
 
 
 
 
 
bf13d74
f8357db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import streamlit as st
import pandas as pd 
import numpy as np 
import requests




st.title('Hushh-emails')

# st.write("Enter your query")
# gmail_query= st.text_input("Query")

# if st.button('Login to your google account'):

#     #requests.get(url= "http://127.0.0.1:8000/login/google")
#     requests.get(url="https://hushh-hushh-jobs-emails.hf.space/login/google")

# if st.button('Download resumes'):
#     #requests.get(url=f"http://127.0.0.1:8000/download/google?q={gmail_query}")
#     requests.get(url=f"https://hushh-hushh-jobs-emails.hf.space/download/google?q={gmail_query}")


gmail_query= st.text_input("Enter your Gmail Query")

if 'clicked' not in st.session_state:
     st.session_state.clicked = False

def login_button():
        requests.get(url= "https://hushh-hushh-jobs-emails.hf.space/login/google")
        st.session_state.clicked=True
        

if st.button('Login using google',on_click=login_button):
        st.success('Login Successful !!')
        st.success('Proceed to download the resumes ...')


if st.session_state.clicked:
          if st.button('Download Resumes'):
                 requests.get(url=f"https://hushh-hushh-jobs-emails.hf.space/download/google?q={gmail_query}")