Spaces:
Running
Running
Update ui.py
Browse files
ui.py
CHANGED
@@ -32,7 +32,7 @@ def APP():
|
|
32 |
0: "BIO ENGINEERING LAB @newMATTER",
|
33 |
1: "EXECUTED OPERATIONS @newMATTER",
|
34 |
|
35 |
-
|
36 |
|
37 |
tab_selection=st.pills(
|
38 |
"TABS",
|
@@ -74,6 +74,20 @@ def APP():
|
|
74 |
project_name=None
|
75 |
target=None
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
if st.session_state.projectname and st.session_state.projectname == "":
|
79 |
with st.expander("set up the project before proceeding ."):
|
|
|
32 |
0: "BIO ENGINEERING LAB @newMATTER",
|
33 |
1: "EXECUTED OPERATIONS @newMATTER",
|
34 |
|
35 |
+
}
|
36 |
|
37 |
tab_selection=st.pills(
|
38 |
"TABS",
|
|
|
74 |
project_name=None
|
75 |
target=None
|
76 |
|
77 |
+
|
78 |
+
def scan_for_project_availability(user_id):
|
79 |
+
request_url=f"https://thexforce-combat-backend.hf.space/{user_id}/projects"
|
80 |
+
|
81 |
+
response=requests.get(request_url,headers={
|
82 |
+
|
83 |
+
"Content-Type":"application/json",
|
84 |
+
"Authorization":f"Bearer {tok}"
|
85 |
+
})
|
86 |
+
project_details=response.json()
|
87 |
+
if project_details.get("projectname") !=None or project_details.get("projectname") !="":
|
88 |
+
st.session_state.projectname = project_details.get("projectname")
|
89 |
+
|
90 |
+
scan_for_project_availability()
|
91 |
|
92 |
if st.session_state.projectname and st.session_state.projectname == "":
|
93 |
with st.expander("set up the project before proceeding ."):
|