Spaces:
Runtime error
Runtime error
Commit
·
39a61e0
1
Parent(s):
22dc1ea
Update app.py
Browse files
app.py
CHANGED
@@ -65,6 +65,8 @@ if page == 'Review Analysis':
|
|
65 |
models = ["gpt-3.5-turbo", "gpt-4"]
|
66 |
selected_model = st.selectbox("Choose a model:", models)
|
67 |
|
|
|
|
|
68 |
# User input for prompts
|
69 |
phase1_prompt = st.text_area("Enter your prompt for Phase 1- wherever you see '{}', we are passing reviews at that place", value="Analyze a set of customer reviews and identify the unique pros and cons and their themes mentioned by customers. for each pros and cons also mention unique theme associated for that pro/cons. Your response should have format like this.\n\nPros:\n\n1. Theme1 (please replace theme identified here): explanaition\n2. Theme2 (please replace theme identified here): explaination\n\ncons:\n1. Theme1: explanaition\n2. Theme2: explaination\n\nIn your analysis, consider the language and tone used in the reviews to accurately represent the customer's experience. here are the reviews\n {}")
|
70 |
phase2_prompt = st.text_area("Enter your prompt for Phase 2- wherever you see '{}', we are passing reviews at that place", value="Analyze a set of customer reviews pros/cons and identify the only unique pros and cons and their themes mentioned by customers. for each pros and cons also mention unique theme associated for that pro/cons. Your response should have format like this.\n\nPros:\n\n1. Theme1 (please replace theme identified here): explanaition\n2. Theme2 (please replace theme identified here): explaination\n\ncons:\n1. Theme1: explanaition\n2. Theme2: explaination\n\nIn your analysis, consider the language and tone used in the reviews to accurately represent the customer's experience. here are the reviews\n {}")
|
@@ -90,6 +92,8 @@ if page == 'Review Analysis':
|
|
90 |
|
91 |
####first chunking
|
92 |
|
|
|
|
|
93 |
separator = '\n'
|
94 |
char_limit = 9000
|
95 |
|
|
|
65 |
models = ["gpt-3.5-turbo", "gpt-4"]
|
66 |
selected_model = st.selectbox("Choose a model:", models)
|
67 |
|
68 |
+
user_char_limit = st.number_input("Enter character limit for chunk:", value=9000, step=500)
|
69 |
+
|
70 |
# User input for prompts
|
71 |
phase1_prompt = st.text_area("Enter your prompt for Phase 1- wherever you see '{}', we are passing reviews at that place", value="Analyze a set of customer reviews and identify the unique pros and cons and their themes mentioned by customers. for each pros and cons also mention unique theme associated for that pro/cons. Your response should have format like this.\n\nPros:\n\n1. Theme1 (please replace theme identified here): explanaition\n2. Theme2 (please replace theme identified here): explaination\n\ncons:\n1. Theme1: explanaition\n2. Theme2: explaination\n\nIn your analysis, consider the language and tone used in the reviews to accurately represent the customer's experience. here are the reviews\n {}")
|
72 |
phase2_prompt = st.text_area("Enter your prompt for Phase 2- wherever you see '{}', we are passing reviews at that place", value="Analyze a set of customer reviews pros/cons and identify the only unique pros and cons and their themes mentioned by customers. for each pros and cons also mention unique theme associated for that pro/cons. Your response should have format like this.\n\nPros:\n\n1. Theme1 (please replace theme identified here): explanaition\n2. Theme2 (please replace theme identified here): explaination\n\ncons:\n1. Theme1: explanaition\n2. Theme2: explaination\n\nIn your analysis, consider the language and tone used in the reviews to accurately represent the customer's experience. here are the reviews\n {}")
|
|
|
92 |
|
93 |
####first chunking
|
94 |
|
95 |
+
char_limit= user_char_limit
|
96 |
+
|
97 |
separator = '\n'
|
98 |
char_limit = 9000
|
99 |
|