Hadeeratef91 commited on
Commit
363c2d3
·
verified ·
1 Parent(s): 1cc71dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -176,5 +176,19 @@ if st.session_state.get("username") == "admin":
176
 
177
  except Exception as e:
178
  st.error(f"❌ خطأ في قراءة الملف: {e}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
 
180
 
 
176
 
177
  except Exception as e:
178
  st.error(f"❌ خطأ في قراءة الملف: {e}")
179
+ import os
180
+
181
+ # زر لتحميل ملف قاعدة البيانات - يظهر دائمًا
182
+ if os.path.exists("complaints_system.db"):
183
+ with open("complaints_system.db", "rb") as db_file:
184
+ st.download_button(
185
+ label="📥 تحميل complaints_system.db",
186
+ data=db_file,
187
+ file_name="complaints_system.db",
188
+ mime="application/octet-stream"
189
+ )
190
+ else:
191
+ st.warning("⚠️ ملف قاعدة البيانات غير موجود في هذا المسار.")
192
+
193
 
194