Commit
·
639adfc
1
Parent(s):
af99973
Update app.py
Browse filesgpu not available so shifting to cpu
app.py
CHANGED
|
@@ -113,8 +113,7 @@ class SimpleUnet(nn.Module):
|
|
| 113 |
return self.output(x)
|
| 114 |
|
| 115 |
model = SimpleUnet()
|
| 116 |
-
|
| 117 |
-
model
|
| 118 |
|
| 119 |
def linear_beta_schedule(timesteps):
|
| 120 |
beta_start = 0.0001
|
|
@@ -184,7 +183,7 @@ def sample(model, image_size, batch_size=16, channels=3):
|
|
| 184 |
model = SimpleUnet()
|
| 185 |
|
| 186 |
st.title("Generatig images using a diffusion model")
|
| 187 |
-
model.load_state_dict(torch.load("new_linear_model_1090.pt"))
|
| 188 |
|
| 189 |
|
| 190 |
if(st.button("Click to generate image")):
|
|
|
|
| 113 |
return self.output(x)
|
| 114 |
|
| 115 |
model = SimpleUnet()
|
| 116 |
+
|
|
|
|
| 117 |
|
| 118 |
def linear_beta_schedule(timesteps):
|
| 119 |
beta_start = 0.0001
|
|
|
|
| 183 |
model = SimpleUnet()
|
| 184 |
|
| 185 |
st.title("Generatig images using a diffusion model")
|
| 186 |
+
model.load_state_dict(torch.load("new_linear_model_1090.pt"), map_location=torch.device('cpu'))
|
| 187 |
|
| 188 |
|
| 189 |
if(st.button("Click to generate image")):
|