Update app104.py
Browse files
app104.py
CHANGED
@@ -347,7 +347,7 @@ if "task_choice" in st.session_state:
|
|
347 |
if content and label:
|
348 |
few_shot_examples.append({"content": content, "label": label})
|
349 |
|
350 |
-
num_to_generate = st.number_input("Number of examples", 1,
|
351 |
#sytem role after
|
352 |
# System role customization
|
353 |
#default_system_role = f"You are a professional {classification_type} expert, your role is to generate text examples for {domain} domain. Always generate unique diverse examples and do not repeat the generated data. The generated text should be between {min_words} to {max_words} words long."
|
@@ -467,7 +467,8 @@ if "task_choice" in st.session_state:
|
|
467 |
messages=[{"role": "system", "content": st.session_state['system_prompt']}],
|
468 |
temperature=temperature,
|
469 |
stream=True,
|
470 |
-
max_tokens=80000,
|
|
|
471 |
top_p=0.9,
|
472 |
# repetition_penalty=1.2,
|
473 |
#frequency_penalty=0.5, # Discourages frequent words
|
@@ -868,7 +869,7 @@ if "task_choice" in st.session_state:
|
|
868 |
num_examples = st.number_input("Number of examples to classify", 1, 100, 1)
|
869 |
|
870 |
examples_to_classify = []
|
871 |
-
if num_examples <=
|
872 |
for i in range(num_examples):
|
873 |
example = st.text_area(f"Example {i+1}", key=f"example_{i}")
|
874 |
if example:
|
@@ -1167,7 +1168,8 @@ if "task_choice" in st.session_state:
|
|
1167 |
messages=[{"role": "system", "content": system_prompt}],
|
1168 |
temperature=temperature,
|
1169 |
stream=True,
|
1170 |
-
max_tokens=20000,
|
|
|
1171 |
top_p = 0.9,
|
1172 |
|
1173 |
)
|
|
|
347 |
if content and label:
|
348 |
few_shot_examples.append({"content": content, "label": label})
|
349 |
|
350 |
+
num_to_generate = st.number_input("Number of examples", 1, 100, 10)
|
351 |
#sytem role after
|
352 |
# System role customization
|
353 |
#default_system_role = f"You are a professional {classification_type} expert, your role is to generate text examples for {domain} domain. Always generate unique diverse examples and do not repeat the generated data. The generated text should be between {min_words} to {max_words} words long."
|
|
|
467 |
messages=[{"role": "system", "content": st.session_state['system_prompt']}],
|
468 |
temperature=temperature,
|
469 |
stream=True,
|
470 |
+
#max_tokens=80000,
|
471 |
+
max_tokens=4000,
|
472 |
top_p=0.9,
|
473 |
# repetition_penalty=1.2,
|
474 |
#frequency_penalty=0.5, # Discourages frequent words
|
|
|
869 |
num_examples = st.number_input("Number of examples to classify", 1, 100, 1)
|
870 |
|
871 |
examples_to_classify = []
|
872 |
+
if num_examples <= 10:
|
873 |
for i in range(num_examples):
|
874 |
example = st.text_area(f"Example {i+1}", key=f"example_{i}")
|
875 |
if example:
|
|
|
1168 |
messages=[{"role": "system", "content": system_prompt}],
|
1169 |
temperature=temperature,
|
1170 |
stream=True,
|
1171 |
+
#max_tokens=20000,
|
1172 |
+
max_tokens=4000,
|
1173 |
top_p = 0.9,
|
1174 |
|
1175 |
)
|