Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -111,15 +111,15 @@ with app_tab:
|
|
| 111 |
st.success(f'✅ Welcome, {pname}!')
|
| 112 |
|
| 113 |
# --- Send data to external API ---
|
| 114 |
-
url = "https://
|
| 115 |
data = {'rno': '15', 'sname': pname, 'sclass': '7'}
|
| 116 |
response = requests.post(url, data=data)
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
else:
|
| 124 |
st.error("❌ Match not found. Try again.")
|
| 125 |
# try:
|
|
|
|
| 111 |
st.success(f'✅ Welcome, {pname}!')
|
| 112 |
|
| 113 |
# --- Send data to external API ---
|
| 114 |
+
url = "https://skattendancesystem25.glitch.me/adds"
|
| 115 |
data = {'rno': '15', 'sname': pname, 'sclass': '7'}
|
| 116 |
response = requests.post(url, data=data)
|
| 117 |
+
if response.status_code == 200:
|
| 118 |
+
st.success("Attendance marked successfully.")
|
| 119 |
+
else:
|
| 120 |
+
st.warning("Failed to update attendance.")
|
| 121 |
+
# except Exception as e:
|
| 122 |
+
# st.error(f"Request failed: {e}")
|
| 123 |
else:
|
| 124 |
st.error("❌ Match not found. Try again.")
|
| 125 |
# try:
|