Wedyan2023 commited on
Commit
ceee057
·
verified ·
1 Parent(s): 8233b85

Update app110.py

Browse files
Files changed (1) hide show
  1. app110.py +32 -6
app110.py CHANGED
@@ -378,15 +378,43 @@ if "task_choice" in st.session_state:
378
 
379
  user_prompt = st.text_area("User Prompt (optional)")
380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  # Updated prompt template including system role
382
  prompt_template = PromptTemplate(
383
  input_variables=["system_role", "classification_type", "domain", "num_examples",
384
  "min_words", "max_words", "labels", "user_prompt", "few_shot_examples", "additional_attributes"],
385
- template=(
386
  "{system_role}\n"
387
- "- Use the following parameters:\n"
388
  "- Generate {num_examples} examples\n"
389
- "- Each example should be between {min_words} to {max_words} words long\n"
390
  "- Use these labels: {labels}.\n"
391
  "- Use the following additional attributes:\n"
392
  "- {additional_attributes}\n"
@@ -396,9 +424,7 @@ if "task_choice" in st.session_state:
396
  "- In sentiment analysis, ensure that the sentiment classification is clearly identified as Positive, Negative, or Neutral. Do not leave the sentiment ambiguous.\n"
397
  "- In binary sentiment analysis, classify text strictly as either Positive or Negative. Do not include or imply Neutral as an option.\n"
398
  "- Write unique examples every time.\n"
399
- "- DO NOT REPEAT your gnerated text. \n"
400
- "- For each Output, describe it once and move to the next.\n"
401
- "- List each Output only once, and avoid repeating details.\n"
402
  "- Additional instructions: {user_prompt}\n\n"
403
  "- Use the following examples as a reference in the generation process\n\n {few_shot_examples}. \n"
404
  "- Think step by step, generate numbered examples, and check each newly generated example to ensure it has not been generated before. If it has, modify it"
 
378
 
379
  user_prompt = st.text_area("User Prompt (optional)")
380
 
381
+ # # Updated prompt template including system role
382
+ # prompt_template = PromptTemplate(
383
+ # input_variables=["system_role", "classification_type", "domain", "num_examples",
384
+ # "min_words", "max_words", "labels", "user_prompt", "few_shot_examples", "additional_attributes"],
385
+ # template=(
386
+ # "{system_role}\n"
387
+ # "- Use the following parameters:\n"
388
+ # "- Generate {num_examples} examples\n"
389
+ # "- Each example should be between {min_words} to {max_words} words long\n"
390
+ # "- Use these labels: {labels}.\n"
391
+ # "- Use the following additional attributes:\n"
392
+ # "- {additional_attributes}\n"
393
+ # "- Generate the examples in this format: 'Example text. Label: label'\n"
394
+ # "- Do not include word counts or any additional information\n"
395
+ # "- Always use your creativity and intelligence to generate unique and diverse text data\n"
396
+ # "- In sentiment analysis, ensure that the sentiment classification is clearly identified as Positive, Negative, or Neutral. Do not leave the sentiment ambiguous.\n"
397
+ # "- In binary sentiment analysis, classify text strictly as either Positive or Negative. Do not include or imply Neutral as an option.\n"
398
+ # "- Write unique examples every time.\n"
399
+ # "- DO NOT REPEAT your gnerated text. \n"
400
+ # "- For each Output, describe it once and move to the next.\n"
401
+ # "- List each Output only once, and avoid repeating details.\n"
402
+ # "- Additional instructions: {user_prompt}\n\n"
403
+ # "- Use the following examples as a reference in the generation process\n\n {few_shot_examples}. \n"
404
+ # "- Think step by step, generate numbered examples, and check each newly generated example to ensure it has not been generated before. If it has, modify it"
405
+
406
+ # )
407
+ # )
408
+
409
  # Updated prompt template including system role
410
  prompt_template = PromptTemplate(
411
  input_variables=["system_role", "classification_type", "domain", "num_examples",
412
  "min_words", "max_words", "labels", "user_prompt", "few_shot_examples", "additional_attributes"],
413
+ template=(
414
  "{system_role}\n"
415
+ "- Use the following parameters:\n"
416
  "- Generate {num_examples} examples\n"
417
+ "- Each example should be between {min_words} to {max_words} words long, 50 words short text and more than 50 words long text with not less than 4 lines\n"
418
  "- Use these labels: {labels}.\n"
419
  "- Use the following additional attributes:\n"
420
  "- {additional_attributes}\n"
 
424
  "- In sentiment analysis, ensure that the sentiment classification is clearly identified as Positive, Negative, or Neutral. Do not leave the sentiment ambiguous.\n"
425
  "- In binary sentiment analysis, classify text strictly as either Positive or Negative. Do not include or imply Neutral as an option.\n"
426
  "- Write unique examples every time.\n"
427
+ "- DO NOT REPEAT gnerated examples. \n"
 
 
428
  "- Additional instructions: {user_prompt}\n\n"
429
  "- Use the following examples as a reference in the generation process\n\n {few_shot_examples}. \n"
430
  "- Think step by step, generate numbered examples, and check each newly generated example to ensure it has not been generated before. If it has, modify it"