hltdx commited on
Commit
150077a
·
unverified ·
1 Parent(s): 640703c

Adding more return feedback.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def get_query_params(request: gr.Request):
29
  # Function to load data from local storage
30
  def load_data(secret):
31
  if secret != secret_value:
32
- return
33
  if os.path.exists(local_storage_file):
34
  with open(local_storage_file, "r") as file:
35
  data = file.read()
@@ -39,7 +39,7 @@ def load_data(secret):
39
 
40
  def delete_data(secret):
41
  if secret != secret_value:
42
- return
43
  if os.path.exists(local_storage_file):
44
  os.remove(local_storage_file)
45
  return "Data deleted successfully"
 
29
  # Function to load data from local storage
30
  def load_data(secret):
31
  if secret != secret_value:
32
+ return "Secret is incorrect"
33
  if os.path.exists(local_storage_file):
34
  with open(local_storage_file, "r") as file:
35
  data = file.read()
 
39
 
40
  def delete_data(secret):
41
  if secret != secret_value:
42
+ return "Secret is incorrect"
43
  if os.path.exists(local_storage_file):
44
  os.remove(local_storage_file)
45
  return "Data deleted successfully"