Hellisotherpeople
commited on
Commit
•
78238a1
1
Parent(s):
8a31c69
Update app.py
Browse files
app.py
CHANGED
@@ -104,22 +104,22 @@ form.form_submit_button("Generate some Reassuring Parables!")
|
|
104 |
|
105 |
#seed_value = st.sidebar.number_input("Select a seed value - change this to get different output", 42) ## Doesn't work :(
|
106 |
|
107 |
-
input_ids = tokenizer.encode("Computers will never", return_tensors='pt')
|
108 |
-
|
109 |
-
sample_outputs = model.generate(
|
110 |
-
input_ids,
|
111 |
-
do_sample=True,
|
112 |
-
max_length=max_length_of_parable,
|
113 |
-
min_length=min_length_of_parable,
|
114 |
-
top_k=top_k,
|
115 |
-
top_p=top_p,
|
116 |
-
num_return_sequences=number_of_parables,
|
117 |
-
temperature=temperature
|
118 |
-
)
|
119 |
-
|
120 |
|
121 |
|
122 |
with st.spinner("Generating Reassuring Parables"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
#pl.seed_everything(seed_value)
|
124 |
list_of_parables = []
|
125 |
for i, sample_output in enumerate(sample_outputs):
|
|
|
104 |
|
105 |
#seed_value = st.sidebar.number_input("Select a seed value - change this to get different output", 42) ## Doesn't work :(
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
|
109 |
with st.spinner("Generating Reassuring Parables"):
|
110 |
+
input_ids = tokenizer.encode("Computers will never", return_tensors='pt')
|
111 |
+
|
112 |
+
sample_outputs = model.generate(
|
113 |
+
input_ids,
|
114 |
+
do_sample=True,
|
115 |
+
max_length=max_length_of_parable,
|
116 |
+
min_length=min_length_of_parable,
|
117 |
+
top_k=top_k,
|
118 |
+
top_p=top_p,
|
119 |
+
num_return_sequences=number_of_parables,
|
120 |
+
temperature=temperature
|
121 |
+
)
|
122 |
+
|
123 |
#pl.seed_everything(seed_value)
|
124 |
list_of_parables = []
|
125 |
for i, sample_output in enumerate(sample_outputs):
|