Балаганский Никита Николаевич
commited on
Commit
•
c2ef356
1
Parent(s):
1c00a2a
fix
Browse files- generator.py +10 -0
generator.py
CHANGED
@@ -59,6 +59,15 @@ class Generator:
|
|
59 |
text = st.empty()
|
60 |
plot = st.empty()
|
61 |
gen_history = []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
for i in range(max_length):
|
63 |
is_caif_step = (
|
64 |
i % caif_period == 0 and self.caif_sampler is not None
|
@@ -86,6 +95,7 @@ class Generator:
|
|
86 |
"x": list(range(len(gen_history))),
|
87 |
"y": gen_history
|
88 |
})
|
|
|
89 |
plot.plotly_chart([scatter_data], use_container_width=True)
|
90 |
text.text(current_decoded)
|
91 |
|
|
|
59 |
text = st.empty()
|
60 |
plot = st.empty()
|
61 |
gen_history = []
|
62 |
+
layout = go.Layout({
|
63 |
+
"xaxis": {
|
64 |
+
"title": "# Tokens"
|
65 |
+
},
|
66 |
+
"yaxis": {
|
67 |
+
"title": "Desired Attribute"
|
68 |
+
},
|
69 |
+
"plot_bgcolor": '#FFFFFF',
|
70 |
+
})
|
71 |
for i in range(max_length):
|
72 |
is_caif_step = (
|
73 |
i % caif_period == 0 and self.caif_sampler is not None
|
|
|
95 |
"x": list(range(len(gen_history))),
|
96 |
"y": gen_history
|
97 |
})
|
98 |
+
fig = go.Figure([scatter_data], layout=layout)
|
99 |
plot.plotly_chart([scatter_data], use_container_width=True)
|
100 |
text.text(current_decoded)
|
101 |
|