Upload index.py
Browse files
index.py
CHANGED
@@ -27,7 +27,7 @@ TRANSITION_MESSAGES = [
|
|
27 |
def start_registration():
|
28 |
print("Starting registration...")
|
29 |
try:
|
30 |
-
response = requests.post(f"{API_URL}/start_registration", timeout=
|
31 |
response.raise_for_status()
|
32 |
data = response.json()
|
33 |
print("API Response:", data)
|
@@ -61,7 +61,7 @@ def submit_response():
|
|
61 |
}
|
62 |
print("Submitting response with payload:", payload)
|
63 |
try:
|
64 |
-
response = requests.post(f"{API_URL}/submit_response", json=payload
|
65 |
response.raise_for_status()
|
66 |
data = response.json()
|
67 |
print("API Response:", data)
|
@@ -95,7 +95,7 @@ def edit_field(field, value):
|
|
95 |
}
|
96 |
print("Editing field with payload:", payload)
|
97 |
try:
|
98 |
-
response = requests.post(f"{API_URL}/edit_field", json=payload
|
99 |
response.raise_for_status()
|
100 |
data = response.json()
|
101 |
print("API Response:", data)
|
@@ -118,7 +118,7 @@ def main():
|
|
118 |
|
119 |
# Tab 1: Introduction
|
120 |
with tab1:
|
121 |
-
st.subheader("About This Application")
|
122 |
intro_content = read_content_from_file("tab1.txt")
|
123 |
st.markdown(intro_content)
|
124 |
|
|
|
27 |
def start_registration():
|
28 |
print("Starting registration...")
|
29 |
try:
|
30 |
+
response = requests.post(f"{API_URL}/start_registration", timeout=1)
|
31 |
response.raise_for_status()
|
32 |
data = response.json()
|
33 |
print("API Response:", data)
|
|
|
61 |
}
|
62 |
print("Submitting response with payload:", payload)
|
63 |
try:
|
64 |
+
response = requests.post(f"{API_URL}/submit_response", json=payload)
|
65 |
response.raise_for_status()
|
66 |
data = response.json()
|
67 |
print("API Response:", data)
|
|
|
95 |
}
|
96 |
print("Editing field with payload:", payload)
|
97 |
try:
|
98 |
+
response = requests.post(f"{API_URL}/edit_field", json=payload)
|
99 |
response.raise_for_status()
|
100 |
data = response.json()
|
101 |
print("API Response:", data)
|
|
|
118 |
|
119 |
# Tab 1: Introduction
|
120 |
with tab1:
|
121 |
+
# st.subheader("About This Application")
|
122 |
intro_content = read_content_from_file("tab1.txt")
|
123 |
st.markdown(intro_content)
|
124 |
|