Commit
•
8247b69
1
Parent(s):
9b554f2
Update pipeline.py
Browse files- pipeline.py +2 -13
pipeline.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
|
2 |
-
import jax
|
3 |
import flax.linen as nn
|
4 |
|
5 |
from transformers.models.bart.modeling_flax_bart import (
|
@@ -10,7 +9,7 @@ from transformers.models.bart.modeling_flax_bart import (
|
|
10 |
FlaxBartDecoder
|
11 |
)
|
12 |
|
13 |
-
from transformers import BartConfig
|
14 |
|
15 |
from vqgan_jax.modeling_flax_vqgan import VQModel
|
16 |
import numpy as np
|
@@ -98,13 +97,3 @@ class PreTrainedPipeline():
|
|
98 |
clipped_image = decoded_image.squeeze().clip(0., 1.)
|
99 |
|
100 |
return Image.fromarray(np.asarray(clipped_image * 255, dtype=np.uint8))
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
1 |
+
\nimport jax
|
|
|
2 |
import flax.linen as nn
|
3 |
|
4 |
from transformers.models.bart.modeling_flax_bart import (
|
|
|
9 |
FlaxBartDecoder
|
10 |
)
|
11 |
|
12 |
+
from transformers import BartConfig, BartTokenizer
|
13 |
|
14 |
from vqgan_jax.modeling_flax_vqgan import VQModel
|
15 |
import numpy as np
|
|
|
97 |
clipped_image = decoded_image.squeeze().clip(0., 1.)
|
98 |
|
99 |
return Image.fromarray(np.asarray(clipped_image * 255, dtype=np.uint8))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|