JUNGU commited on
Commit
03cbafc
1 Parent(s): d6984a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -15,7 +15,23 @@ def main():
15
  if st.button("Find Keywords"):
16
 
17
  # few-shot learning을 이용한 task_description
18
- # task_description = """You are a helpful assistant that generates annotated text for the st-annotated-text library in Python. Highlight the key terms that are most important in the context of the sentence. Your output should be formatted in the following way:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  # annotated_text(
20
  # "This ",
21
  # ("is", ""),
@@ -31,7 +47,7 @@ def main():
31
  # ". "
32
  # )"""
33
 
34
- # task_description = """You are a helpful assistant that generates annotated text for the st-annotated-text library in Python. Highlight the key terms that are most important in the context of the sentence, especially focusing on the main subject involved. Your output should be formatted in the following way for text:
35
  # annotated_text(
36
  # "This ",
37
  # ("is", ""),
@@ -47,6 +63,8 @@ def main():
47
  # ". "
48
  # )"""
49
 
 
 
50
  # task_description = """You are a helpful assistant that generates annotated text for the st-annotated-text library in Python. Your task is to highlight the key terms that are central to the overall topic or theme of the sentence. Your output should be formatted in the following way:
51
  # annotated_text(
52
  # "This ",
@@ -63,25 +81,7 @@ def main():
63
  # ". "
64
  # )"""
65
 
66
- # user_prompt = f"Now, please annotate this text: {user_text}"
67
-
68
- task_description = """You are a helpful assistant that generates annotated text for the st-annotated-text library in Python. Your task is to highlight the key terms that are central to the overall topic or theme of the sentence. Your output should be formatted in the following way:
69
- annotated_text(
70
- "This ",
71
- ("is", ""),
72
- " some ",
73
- ("annotated", ""),
74
- ("text", ""),
75
- " for those of ",
76
- ("you", ""),
77
- " who ",
78
- ("like", ""),
79
- " this sort of ",
80
- ("thing", ""),
81
- ". "
82
- )"""
83
-
84
- user_prompt = f"Based on the task description, please annotate the following text by highlighting the key terms central to its topic or theme: {user_text}"
85
 
86
 
87
  messages = [{"role": "system", "content": task_description}, {"role": "user", "content": user_prompt}]
 
15
  if st.button("Find Keywords"):
16
 
17
  # few-shot learning을 이용한 task_description
18
+ task_description = """You are a helpful assistant that generates annotated text for the st-annotated-text library in Python. Your output should be formatted in the following way:
19
+ annotated_text(
20
+ "This ",
21
+ ("is", ""),
22
+ " some ",
23
+ ("annotated", ""),
24
+ ("text", ""),
25
+ " for those of ",
26
+ ("you", ""),
27
+ " who ",
28
+ ("like", ""),
29
+ " this sort of ",
30
+ ("thing", ""),
31
+ ". "
32
+ )"""
33
+
34
+ # task_description = """You are a helpful assistant that generates annotated text for the st-annotated-text library in Python. Highlight the key terms that are most important in the context of the sentence, especially focusing on the main subject involved. Your output should be formatted in the following way for text:
35
  # annotated_text(
36
  # "This ",
37
  # ("is", ""),
 
47
  # ". "
48
  # )"""
49
 
50
+ # task_description = """You are a helpful assistant that generates annotated text for the st-annotated-text library in Python. Your task is to highlight the key terms that are central to the overall topic or theme of the sentence. Your output should be formatted in the following way:
51
  # annotated_text(
52
  # "This ",
53
  # ("is", ""),
 
63
  # ". "
64
  # )"""
65
 
66
+ # user_prompt = f"Now, please annotate this text: {user_text}"
67
+
68
  # task_description = """You are a helpful assistant that generates annotated text for the st-annotated-text library in Python. Your task is to highlight the key terms that are central to the overall topic or theme of the sentence. Your output should be formatted in the following way:
69
  # annotated_text(
70
  # "This ",
 
81
  # ". "
82
  # )"""
83
 
84
+ user_prompt = f"Based on the task description, please annotate the following text by highlighting the key terms central to its topic : {user_text}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
 
87
  messages = [{"role": "system", "content": task_description}, {"role": "user", "content": user_prompt}]