treasuraid commited on
Commit
8124b54
·
1 Parent(s): ff92cb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -52,16 +52,18 @@ def elapsed_time(fn, *args):
52
 
53
  def main():
54
 
55
- device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
56
-
57
- elapsed, pipeline = elapsed_time(load_pipeline_w_lora)
58
- pipeline = pipeline.to(device)
59
 
60
  st.write(f"Model is loaded in {elapsed} seconds!")
61
 
62
  st.title("BAYC Text to IMAGE generator")
63
  st.write(f"Stable diffusion model is fine-tuned by lora using dataset {DATASET_REPO}")
64
 
 
 
 
 
 
65
  sample = Image.open(SAMPLE_IMAGE)
66
  st.image(sample, caption="Example image with prompt <An ape with solid gold fur and beanie>")
67
 
 
52
 
53
  def main():
54
 
55
+
 
 
 
56
 
57
  st.write(f"Model is loaded in {elapsed} seconds!")
58
 
59
  st.title("BAYC Text to IMAGE generator")
60
  st.write(f"Stable diffusion model is fine-tuned by lora using dataset {DATASET_REPO}")
61
 
62
+ device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
63
+
64
+ elapsed, pipeline = elapsed_time(load_pipeline_w_lora)
65
+ pipeline = pipeline.to(device)
66
+
67
  sample = Image.open(SAMPLE_IMAGE)
68
  st.image(sample, caption="Example image with prompt <An ape with solid gold fur and beanie>")
69