Ragulkumar1104 commited on
Commit
734aa69
·
verified ·
1 Parent(s): 153fa4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -1,4 +1,17 @@
1
- import streamlit as st
 
 
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from diffusers import StableDiffusionPipeline
2
+ import matplotlib.pyplot as plt
3
+ import torch
4
 
5
+ model_id1 = "dreamlike-art/dreamlike-diffusion-1.0"
6
+ model_id2 = "stabilityai/stable-diffusion-xl-base-1.0"
7
+
8
+ pipe = StableDiffusionPipeline.from_pretrained(model_id1, torch_dtype=torch.float16, use_safetensors=True)
9
+ pipe = pipe.to("cuda")
10
+
11
+ prompt = """ batman
12
+ """
13
+ image = pipe(prompt).images[0]
14
+
15
+ print("[PROMPT]: ",prompt)
16
+ plt.imshow(image);
17
+ plt.axis('off');