chainyo commited on
Commit
78df2c5
β€’
1 Parent(s): 43c72d5

remove recipe choice for now

Browse files
Files changed (1) hide show
  1. app.py +42 -39
app.py CHANGED
@@ -66,34 +66,35 @@ button {
66
  unsafe_allow_html=True,
67
  )
68
 
69
- st.title("kwest.dev")
70
- st.subheader("Leverage the power of storytelling for any idea. πŸ’‘")
 
71
 
72
- with st.expander(label="How to present your idea to get the best story πŸ‘‡", expanded=True):
73
- st.markdown(
74
- """
75
- - 🎯 Explain the **main objective** of your idea. What is the **main goal** you are trying to achieve?
76
- - πŸ“ Give as much **context** as possible. For example, what is the problem you are trying to solve? If you have a good name for your idea, share it.
77
- - πŸ‘€ What is the **audience** for your idea? Who are the people that should be interested in it?
78
 
79
- Once you have shared these details, you will have the opportunity to choose a recipe to craft your story.
80
- The different recipes available are: `sell`, `motivate`, `convince`, `connect`, `explain`, `lead`, `impress`
81
 
82
- You can choose the recipe that best fits your idea, but to help you decide we will mark the 1st and 2nd best recipes with πŸ₯‡ and πŸ₯ˆ respectively.
83
 
84
- ---
85
 
86
- __Examples of good and bad inputs:__
87
 
88
- βœ… `I need a pitch for a new app that helps people find the best restaurants in town based on their previous feedback. I will present it to angel investors. The name of the app is "Foodie".`
89
 
90
- βœ… `I want to present to my friends the idea of a collaborative group of people that help each other to achieve their goals. I want to motivate them to join the group to allow people to share knowledge together and grow skills using peer-to-peer learning.`
 
91
 
92
- βœ… `I'm going to present a new way to manage projects to my team. I want to convince them that this new method will help us be more efficient, reduce stress, and deliver better results.`
93
-
94
- ❌ `I need a pitch for a new app. It's cool.`
95
- """
96
- )
97
 
98
  input_col, btn_col = st.columns([3, 1], vertical_alignment="bottom")
99
  with input_col:
@@ -114,25 +115,27 @@ if check_input and input_str != "":
114
  )
115
 
116
  if input_is_valid["objective"] == "yes" and input_is_valid["context"] == "yes" and input_is_valid["audience"] == "yes":
117
- recipe_choices = get_recipe_choices(input_str)
118
- st.write("Choose the recipe you want to use for your story.")
119
-
120
- recipe_choices_col = st.columns(7, vertical_alignment="bottom")
121
- for idx, recipe in enumerate(RECIPES):
122
- with recipe_choices_col[idx]:
123
- if recipe == recipe_choices["recipe"]:
124
- _recipe = f"πŸ₯‡{recipe}"
125
- elif recipe == recipe_choices["second_recipe"]:
126
- _recipe = f"πŸ₯ˆ{recipe}"
127
- else:
128
- _recipe = recipe
129
-
130
- st.button(
131
- _recipe,
132
- on_click=craft_story_from_recipe,
133
- kwargs={"input_str": input_str, "recipe": recipe},
134
- use_container_width=True,
135
- )
 
 
136
 
137
  if "story" in st.session_state:
138
  st.markdown(st.session_state.story)
 
66
  unsafe_allow_html=True,
67
  )
68
 
69
+ _recipe_choice_explanations = """
70
+ Once you have shared these details, you will have the opportunity to choose a recipe to craft your story.
71
+ The different recipes available are: `sell`, `motivate`, `convince`, `connect`, `explain`, `lead`, `impress`
72
 
73
+ You can choose the recipe that best fits your idea, but to help you decide we will mark the 1st and 2nd best recipes with πŸ₯‡ and πŸ₯ˆ respectively.
74
+ """
75
+ _explanations = f"""
76
+ - 🎯 Explain the **main objective** of your idea. What is the **main goal** you are trying to achieve?
77
+ - πŸ“ Give as much **context** as possible. For example, what is the problem you are trying to solve? If you have a good name for your idea, share it.
78
+ - πŸ‘€ What is the **audience** for your idea? Who are the people that should be interested in it?
79
 
80
+ ---
 
81
 
82
+ __Examples of good and bad inputs:__
83
 
84
+ βœ… `I need a pitch for a new app that helps people find the best restaurants in town based on their previous feedback. I will present it to angel investors. The name of the app is "Foodie".`
85
 
86
+ βœ… `I want to present to my friends the idea of a collaborative group of people that help each other to achieve their goals. I want to motivate them to join the group to allow people to share knowledge together and grow skills using peer-to-peer learning.`
87
 
88
+ βœ… `I'm going to present a new way to manage projects to my team. I want to convince them that this new method will help us be more efficient, reduce stress, and deliver better results.`
89
 
90
+ ❌ `I need a pitch for a new app. It's cool.`
91
+ """
92
 
93
+ st.title("kwest.dev")
94
+ st.subheader("Leverage the power of storytelling for any idea. πŸ’‘")
95
+
96
+ with st.expander(label="How to present your idea to get the best story πŸ‘‡", expanded=True):
97
+ st.markdown(_explanations)
98
 
99
  input_col, btn_col = st.columns([3, 1], vertical_alignment="bottom")
100
  with input_col:
 
115
  )
116
 
117
  if input_is_valid["objective"] == "yes" and input_is_valid["context"] == "yes" and input_is_valid["audience"] == "yes":
118
+ # NOTE: Only sell recipe is available for now.
119
+ craft_story_from_recipe(input_str, "sell")
120
+ # recipe_choices = get_recipe_choices(input_str)
121
+ # st.write("Choose the recipe you want to use for your story.")
122
+
123
+ # recipe_choices_col = st.columns(7, vertical_alignment="bottom")
124
+ # for idx, recipe in enumerate(RECIPES):
125
+ # with recipe_choices_col[idx]:
126
+ # if recipe == recipe_choices["recipe"]:
127
+ # _recipe = f"πŸ₯‡{recipe}"
128
+ # elif recipe == recipe_choices["second_recipe"]:
129
+ # _recipe = f"πŸ₯ˆ{recipe}"
130
+ # else:
131
+ # _recipe = recipe
132
+
133
+ # st.button(
134
+ # _recipe,
135
+ # on_click=craft_story_from_recipe,
136
+ # kwargs={"input_str": input_str, "recipe": recipe},
137
+ # use_container_width=True,
138
+ # )
139
 
140
  if "story" in st.session_state:
141
  st.markdown(st.session_state.story)