osanseviero
commited on
Commit
•
71a8430
1
Parent(s):
c9da6df
Update pipeline.py
Browse files- pipeline.py +2 -1
pipeline.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import torch
|
2 |
import torch.nn as nn
|
3 |
from huggingface_hub import PyTorchModelHubMixin
|
|
|
4 |
|
5 |
class Generator(nn.Module, PyTorchModelHubMixin):
|
6 |
def __init__(self, num_channels=3, latent_dim=100, hidden_size=64):
|
@@ -55,5 +56,5 @@ class PreTrainedPipeline():
|
|
55 |
output = self.model(noise)
|
56 |
|
57 |
# Scale image
|
58 |
-
img =
|
59 |
return img
|
|
|
1 |
import torch
|
2 |
import torch.nn as nn
|
3 |
from huggingface_hub import PyTorchModelHubMixin
|
4 |
+
from PIL import Image
|
5 |
|
6 |
class Generator(nn.Module, PyTorchModelHubMixin):
|
7 |
def __init__(self, num_channels=3, latent_dim=100, hidden_size=64):
|
|
|
56 |
output = self.model(noise)
|
57 |
|
58 |
# Scale image
|
59 |
+
img = Image.fromarray(output)
|
60 |
return img
|