Spaces:
Running
Running
Update ui.py
Browse files
ui.py
CHANGED
@@ -7,18 +7,6 @@ tok=os.getenv("TOK")
|
|
7 |
|
8 |
|
9 |
|
10 |
-
def InitSession():
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
if "projectname" not in st.session_state:
|
15 |
-
st.session_state.projectname=""
|
16 |
-
|
17 |
-
#if "loggedin" not in st.session_state:
|
18 |
-
# st.session_state.loggedin=False
|
19 |
-
|
20 |
-
|
21 |
-
InitSession()
|
22 |
|
23 |
|
24 |
|
@@ -91,10 +79,13 @@ def APP():
|
|
91 |
scan_for_project_availability(st.user.email)
|
92 |
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
98 |
|
99 |
|
100 |
bio_input = st.text_area(
|
@@ -111,7 +102,7 @@ def APP():
|
|
111 |
|
112 |
payload={
|
113 |
"uid":st.user.email ,
|
114 |
-
"pid":project_name,
|
115 |
"target":target,
|
116 |
"high_level_bio_query":bio_input
|
117 |
}
|
|
|
7 |
|
8 |
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
|
12 |
|
|
|
79 |
scan_for_project_availability(st.user.email)
|
80 |
|
81 |
|
82 |
+
|
83 |
+
projectname = st.session_state.get("projectname", "") # safe default
|
84 |
+
|
85 |
+
if projectname == "":
|
86 |
+
with st.expander("Set up the project before proceeding."):
|
87 |
+
project_name = st.text_input("Provide project name > ")
|
88 |
+
|
89 |
|
90 |
|
91 |
bio_input = st.text_area(
|
|
|
102 |
|
103 |
payload={
|
104 |
"uid":st.user.email ,
|
105 |
+
"pid":project_name or projectname,
|
106 |
"target":target,
|
107 |
"high_level_bio_query":bio_input
|
108 |
}
|