Spaces:
Runtime error
Runtime error
code refactored
Browse files
app.py
CHANGED
@@ -25,23 +25,31 @@ def get_token():
|
|
25 |
|
26 |
|
27 |
def prompt_letter():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
with st.form(key="my_form_to_submit"):
|
29 |
st.markdown(
|
30 |
-
"##
|
31 |
-
"
|
32 |
-
"-
|
|
|
33 |
" - Session: Go to Application → Cookies → `__Secure-1PSID` and `__Secure-1PSIDTS`. Copy the value of both cookies respectively."
|
34 |
)
|
35 |
-
# token will be returned --
|
36 |
psid = st.text_input(
|
37 |
label="Enter your __Secure-1PSID",
|
38 |
-
max_chars=
|
39 |
type="default",
|
40 |
placeholder="Place yours PSID. It ends with a dot.",
|
41 |
)
|
42 |
psidts = st.text_input(
|
43 |
label="Enter your __Secure-1PSIDTS",
|
44 |
-
max_chars=
|
45 |
type="default",
|
46 |
placeholder="Place yours PSIDTS...",
|
47 |
)
|
@@ -64,6 +72,8 @@ def prompt_letter():
|
|
64 |
"I am passionate about...",
|
65 |
"solving problems at the intersection of technology and social good.",
|
66 |
)
|
|
|
|
|
67 |
submit_button = st.form_submit_button(label="Submit")
|
68 |
|
69 |
prompt = (
|
|
|
25 |
|
26 |
|
27 |
def prompt_letter():
|
28 |
+
"""
|
29 |
+
This function creates a form with input fields for various information required to generate a cover letter.
|
30 |
+
It prompts the user to enter their __Secure-1PSID and __Secure-1PSIDTS tokens, company name, role they are applying for,
|
31 |
+
contact person, their name, personal experience, job description, and their passion.
|
32 |
+
The function then returns the entered __Secure-1PSID token, __Secure-1PSIDTS token, a cover letter prompt, and a submit button.
|
33 |
+
|
34 |
+
:return: A tuple containing the entered __Secure-1PSID token, __Secure-1PSIDTS token, cover letter prompt, and submit button.
|
35 |
+
"""
|
36 |
with st.form(key="my_form_to_submit"):
|
37 |
st.markdown(
|
38 |
+
"## BARD API token\n"
|
39 |
+
"Go to https://bard.google.com/\n"
|
40 |
+
"- F12 for console\n"
|
41 |
+
"- Copy the values of the cookies:\n"
|
42 |
" - Session: Go to Application → Cookies → `__Secure-1PSID` and `__Secure-1PSIDTS`. Copy the value of both cookies respectively."
|
43 |
)
|
|
|
44 |
psid = st.text_input(
|
45 |
label="Enter your __Secure-1PSID",
|
46 |
+
max_chars=100,
|
47 |
type="default",
|
48 |
placeholder="Place yours PSID. It ends with a dot.",
|
49 |
)
|
50 |
psidts = st.text_input(
|
51 |
label="Enter your __Secure-1PSIDTS",
|
52 |
+
max_chars=100,
|
53 |
type="default",
|
54 |
placeholder="Place yours PSIDTS...",
|
55 |
)
|
|
|
72 |
"I am passionate about...",
|
73 |
"solving problems at the intersection of technology and social good.",
|
74 |
)
|
75 |
+
# make a loading bar using tqdm
|
76 |
+
|
77 |
submit_button = st.form_submit_button(label="Submit")
|
78 |
|
79 |
prompt = (
|