job_emails_app / app.py
Vasundhhara's picture
Update app.py
bf13d74 verified
raw
history blame
1.24 kB
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}")