tsi-org commited on
Commit
ec8efc2
·
1 Parent(s): cdbb74c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -10,6 +10,11 @@ import copy
10
  import json
11
  import gc
12
  import random
 
 
 
 
 
13
  with open("sdxl_loras.json", "r") as file:
14
  data = json.load(file)
15
  sdxl_loras_raw = [
@@ -325,4 +330,4 @@ with gr.Blocks(css="custom.css") as demo:
325
  share_button.click(None, [], [], _js=share_js)
326
  demo.load(fn=shuffle_gallery, inputs=[gr_sdxl_loras], outputs=[gallery, gr_sdxl_loras], queue=False)
327
  demo.queue(max_size=20)
328
- demo.launch()
 
10
  import json
11
  import gc
12
  import random
13
+
14
+ # Login function for authentication
15
+ def custom_auth(username, password):
16
+ return password == "aitutor"
17
+
18
  with open("sdxl_loras.json", "r") as file:
19
  data = json.load(file)
20
  sdxl_loras_raw = [
 
330
  share_button.click(None, [], [], _js=share_js)
331
  demo.load(fn=shuffle_gallery, inputs=[gr_sdxl_loras], outputs=[gallery, gr_sdxl_loras], queue=False)
332
  demo.queue(max_size=20)
333
+ demo.launch(debug=True, auth=custom_auth)