Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,8 @@ from bullets.generator import create_bullet_instruction
|
|
16 |
from bonuses.generator import create_bonus_instruction
|
17 |
# Import the offer instruction generator
|
18 |
from prompts import create_offer_instruction
|
|
|
|
|
19 |
|
20 |
# Set page to wide mode to use full width
|
21 |
st.set_page_config(layout="wide")
|
@@ -99,6 +101,7 @@ with col1:
|
|
99 |
st.session_state.target_audience = target_audience
|
100 |
st.session_state.temperature = temperature
|
101 |
st.session_state.formula_type = formula_type
|
|
|
102 |
|
103 |
# Keep only the manual input tab
|
104 |
with st.container():
|
@@ -115,6 +118,13 @@ with col1:
|
|
115 |
target_audience = st.text_area('馃懃 P煤blico Objetivo', height=70,
|
116 |
help='Describe tu cliente o p煤blico ideal')
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
# Add file/image uploader here
|
119 |
uploaded_file = st.file_uploader("馃搫 Sube un archivo o imagen",
|
120 |
type=['txt', 'pdf', 'docx', 'jpg', 'jpeg', 'png'])
|
@@ -212,7 +222,8 @@ with col2:
|
|
212 |
product_service=product_service_value,
|
213 |
selected_formula_name=st.session_state.formula_type,
|
214 |
file_content=file_content,
|
215 |
-
skills=skills_value
|
|
|
216 |
)
|
217 |
|
218 |
# Add instruction for generating benefit bullets based on the promise
|
|
|
16 |
from bonuses.generator import create_bonus_instruction
|
17 |
# Import the offer instruction generator
|
18 |
from prompts import create_offer_instruction
|
19 |
+
# Import sophistication levels
|
20 |
+
from sophistication import sophistication_levels
|
21 |
|
22 |
# Set page to wide mode to use full width
|
23 |
st.set_page_config(layout="wide")
|
|
|
101 |
st.session_state.target_audience = target_audience
|
102 |
st.session_state.temperature = temperature
|
103 |
st.session_state.formula_type = formula_type
|
104 |
+
st.session_state.sophistication_level = sophistication_level
|
105 |
|
106 |
# Keep only the manual input tab
|
107 |
with st.container():
|
|
|
118 |
target_audience = st.text_area('馃懃 P煤blico Objetivo', height=70,
|
119 |
help='Describe tu cliente o p煤blico ideal')
|
120 |
|
121 |
+
# Add sophistication level selector
|
122 |
+
sophistication_level = st.selectbox(
|
123 |
+
'馃 Nivel de Sofisticaci贸n del Mercado',
|
124 |
+
options=list(sophistication_levels.keys()),
|
125 |
+
help='Selecciona el nivel de conocimiento que tiene tu p煤blico sobre soluciones similares'
|
126 |
+
)
|
127 |
+
|
128 |
# Add file/image uploader here
|
129 |
uploaded_file = st.file_uploader("馃搫 Sube un archivo o imagen",
|
130 |
type=['txt', 'pdf', 'docx', 'jpg', 'jpeg', 'png'])
|
|
|
222 |
product_service=product_service_value,
|
223 |
selected_formula_name=st.session_state.formula_type,
|
224 |
file_content=file_content,
|
225 |
+
skills=skills_value,
|
226 |
+
sophistication_level=sophistication_levels.get(st.session_state.sophistication_level) if hasattr(st.session_state, 'sophistication_level') else None
|
227 |
)
|
228 |
|
229 |
# Add instruction for generating benefit bullets based on the promise
|