blanchon commited on
Commit
7d741bb
·
1 Parent(s): 2aee0d9
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import csv
2
  import json
3
  import math
 
4
  import secrets
5
  from pathlib import Path
6
  from typing import cast
@@ -17,6 +18,13 @@ from PIL import Image, ImageFilter, ImageOps
17
 
18
  DEVICE = "cuda"
19
 
 
 
 
 
 
 
 
20
  MAX_SEED = np.iinfo(np.int32).max
21
 
22
  SYSTEM_PROMPT = r"""This two-panel split-frame image showcases a furniture in as a product shot versus styled in a room.
@@ -613,4 +621,4 @@ with gr.Blocks(css=css) as demo:
613
  preprocess=False,
614
  )
615
 
616
- demo.launch()
 
1
  import csv
2
  import json
3
  import math
4
+ import os
5
  import secrets
6
  from pathlib import Path
7
  from typing import cast
 
18
 
19
  DEVICE = "cuda"
20
 
21
+ USER = os.getenv("USER")
22
+ PASSWORD = os.getenv("PASSWORD")
23
+
24
+ if not USER or not PASSWORD:
25
+ msg = "USER and PASSWORD must be set"
26
+ raise ValueError(msg)
27
+
28
  MAX_SEED = np.iinfo(np.int32).max
29
 
30
  SYSTEM_PROMPT = r"""This two-panel split-frame image showcases a furniture in as a product shot versus styled in a room.
 
621
  preprocess=False,
622
  )
623
 
624
+ demo.launch(auth=[(USER, PASSWORD)])