broadfield-dev commited on
Commit
c4624e3
·
verified ·
1 Parent(s): ad29d5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -7,8 +7,10 @@ server_logic = AppServerLogic()
7
  example_db = {"USER":"TestUser","PASS":"TestPass"}
8
 
9
  def login_fn(username,password):
10
- if username==example_db.USER and password==example_db.PASS:
11
  return gr.Update("### Logged in")
 
 
12
 
13
  def process_image_and_display_payload(image):
14
  if image is None:
 
7
  example_db = {"USER":"TestUser","PASS":"TestPass"}
8
 
9
  def login_fn(username,password):
10
+ if username==example_db.get("USER") and password==example_db.get("PASS")
11
  return gr.Update("### Logged in")
12
+ else:
13
+ return gr.Update("### Incorrect Username or Password")
14
 
15
  def process_image_and_display_payload(image):
16
  if image is None: