Spaces:
Runtime error
Runtime error
fixes length issues
Browse files- app.py +3 -3
- story_gen.py +2 -2
app.py
CHANGED
@@ -9,11 +9,11 @@ st.set_page_config(page_title='Storytelling ' +
|
|
9 |
u'\U0001F5BC', page_icon=u'\U0001F5BC', layout="wide")
|
10 |
gen = StoryGenerator()
|
11 |
container_mode = st.sidebar.container()
|
12 |
-
container_guide = st.
|
13 |
container_param = st.sidebar.container()
|
14 |
container_button = st.sidebar.container()
|
15 |
mode = container_mode.radio(
|
16 |
-
"Select
|
17 |
('Create Statistics', 'Play Storytelling'), index=0)
|
18 |
choices_first_sentence = [
|
19 |
'Custom',
|
@@ -138,7 +138,7 @@ elif mode == 'Play Storytelling':
|
|
138 |
# col_sentence.markdown(step['sentence'])
|
139 |
# col_emo.markdown(
|
140 |
# f'{step["emotion"]} {np.round(step["score"], 3)}', unsafe_allow_html=False)
|
141 |
-
|
142 |
'### Write the first sentence and then hit the `Run` button')
|
143 |
|
144 |
if container_button[2].button('Clear'):
|
|
|
9 |
u'\U0001F5BC', page_icon=u'\U0001F5BC', layout="wide")
|
10 |
gen = StoryGenerator()
|
11 |
container_mode = st.sidebar.container()
|
12 |
+
container_guide = st.container()
|
13 |
container_param = st.sidebar.container()
|
14 |
container_button = st.sidebar.container()
|
15 |
mode = container_mode.radio(
|
16 |
+
"Select a mode",
|
17 |
('Create Statistics', 'Play Storytelling'), index=0)
|
18 |
choices_first_sentence = [
|
19 |
'Custom',
|
|
|
138 |
# col_sentence.markdown(step['sentence'])
|
139 |
# col_emo.markdown(
|
140 |
# f'{step["emotion"]} {np.round(step["score"], 3)}', unsafe_allow_html=False)
|
141 |
+
container_guide.markdown(
|
142 |
'### Write the first sentence and then hit the `Run` button')
|
143 |
|
144 |
if container_button[2].button('Clear'):
|
story_gen.py
CHANGED
@@ -198,8 +198,8 @@ class StoryGenerator:
|
|
198 |
reaction_weight = np.round(np.random.random_sample(), 1)
|
199 |
stats_df0, _story_till_now, story_data = self.auto_ist(
|
200 |
story_till_now=story_till_now,
|
201 |
-
num_generation=
|
202 |
-
length=
|
203 |
stats_df0.insert(loc=0, column='story_id', value=story_id+num_rows)
|
204 |
|
205 |
# stats_df0['story_id'] = story_id
|
|
|
198 |
reaction_weight = np.round(np.random.random_sample(), 1)
|
199 |
stats_df0, _story_till_now, story_data = self.auto_ist(
|
200 |
story_till_now=story_till_now,
|
201 |
+
num_generation=num_generations,
|
202 |
+
length=length, reaction_weight=reaction_weight)
|
203 |
stats_df0.insert(loc=0, column='story_id', value=story_id+num_rows)
|
204 |
|
205 |
# stats_df0['story_id'] = story_id
|