Staticaliza commited on
Commit
7de4c3e
·
verified ·
1 Parent(s): 24a6868

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,7 +17,6 @@ if DEVICE == "auto":
17
  print(f"[SYSTEM] | Using {DEVICE} type compute device.")
18
 
19
  # Variables
20
-
21
  MAX_SEED = 9007199254740991
22
  DEFAULT_INPUT = ""
23
  DEFAULT_NEGATIVE_INPUT = ""
@@ -35,6 +34,7 @@ model.load_lora_weights(REPO_WEIGHT, weight_name=WEIGHT, adapter_name=ADAPTER)
35
  model.set_adapters(ADAPTER, adapter_weights=[0.7])
36
  model.to(DEVICE)
37
 
 
38
  def get_seed(seed):
39
  seed = seed.strip()
40
  if seed.isdigit():
@@ -66,6 +66,7 @@ def generate(input=DEFAULT_INPUT, negative_input=DEFAULT_NEGATIVE_INPUT, height=
66
  image_paths = [save_image(img) for img in images]
67
  return image_paths
68
 
 
69
  with gr.Blocks() as main:
70
  with gr.Column():
71
  input = gr.Textbox(lines=1, value=DEFAULT_INPUT, label="Input")
 
17
  print(f"[SYSTEM] | Using {DEVICE} type compute device.")
18
 
19
  # Variables
 
20
  MAX_SEED = 9007199254740991
21
  DEFAULT_INPUT = ""
22
  DEFAULT_NEGATIVE_INPUT = ""
 
34
  model.set_adapters(ADAPTER, adapter_weights=[0.7])
35
  model.to(DEVICE)
36
 
37
+ # Functions
38
  def get_seed(seed):
39
  seed = seed.strip()
40
  if seed.isdigit():
 
66
  image_paths = [save_image(img) for img in images]
67
  return image_paths
68
 
69
+ # Initialize
70
  with gr.Blocks() as main:
71
  with gr.Column():
72
  input = gr.Textbox(lines=1, value=DEFAULT_INPUT, label="Input")