Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def main():
|
|
32 |
# )"""
|
33 |
|
34 |
|
35 |
-
task_description = """ You are a useful helper that generates annotated text for Python's st-annotated-text library. Your task is to identify the topic of the passage and highlight the key words needed to convey the meaning. You should be able to identify the main points. Also, please mark keywords based on the different paragraphs provided in the text. The output should be formatted in the following way:
|
36 |
annotated_text(
|
37 |
"This ",
|
38 |
("is", ""),
|
@@ -48,23 +48,6 @@ def main():
|
|
48 |
". "
|
49 |
)"""
|
50 |
|
51 |
-
#์ถ๋ ฅ ํ์ธํ๋ ์ฌ๋ฌ๋ถ์ Python์ st-annotated-text ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ํด ์ฃผ์์ด ๋ฌ๋ฆฐ ํ
์คํธ๋ฅผ ์์ฑํ๋ ์ ์ฉํ ๋์ฐ๋ฏธ์
๋๋ค. ์ง๋ฌธ์ ์ฃผ์ ๋ฅผ ํ์
ํ๊ณ ์๋ฏธ ์ ๋ฌ์ ํ์ํ ํต์ฌ์ด๋ฅผ ๊ฐ์กฐ ํ์ํ๋ ๊ฒ์ด ์ฌ๋ฌ๋ถ์ ์๋ฌด์
๋๋ค. ์ถ๋ ฅ๋ฌผ์ ํ์์ ๋ค์๊ณผ ๊ฐ์ ๋ฐฉ์์ผ๋ก ์ง์ ํด์ผ ํฉ๋๋ค.
|
52 |
-
|
53 |
-
# task_description = """You are a useful helper that generates annotated text for Python's st-annotated-text library. Your job is to identify the topic of the fingerprint and highlight the key words needed to convey meaning. The output should be formatted in the following way:
|
54 |
-
# annotated_text(
|
55 |
-
# "This ",
|
56 |
-
# ("is", ""),
|
57 |
-
# " some ",
|
58 |
-
# ("annotated", ""),
|
59 |
-
# ("text", ""),
|
60 |
-
# " for those of ",
|
61 |
-
# ("you", ""),
|
62 |
-
# " who ",
|
63 |
-
# ("like", ""),
|
64 |
-
# " this sort of ",
|
65 |
-
# ("thing", ""),
|
66 |
-
# ". "
|
67 |
-
# )"""
|
68 |
|
69 |
# user_prompt = f"Now, please annotate this text: {user_text}"
|
70 |
|
@@ -93,7 +76,7 @@ def main():
|
|
93 |
response = openai.ChatCompletion.create(
|
94 |
model="gpt-3.5-turbo-16k",
|
95 |
messages=messages,
|
96 |
-
temperature=1
|
97 |
max_tokens=2500,
|
98 |
top_p=1,
|
99 |
frequency_penalty=0,
|
|
|
32 |
# )"""
|
33 |
|
34 |
|
35 |
+
task_description = """ You are a useful helper that generates annotated text for Python's st-annotated-text library. Your task is to identify the topic of the passage and highlight the key words needed to convey the meaning. You should be able to identify the main points. Also, please mark keywords based on the different paragraphs and headings provided in the text. The output should be formatted in the following way:
|
36 |
annotated_text(
|
37 |
"This ",
|
38 |
("is", ""),
|
|
|
48 |
". "
|
49 |
)"""
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
# user_prompt = f"Now, please annotate this text: {user_text}"
|
53 |
|
|
|
76 |
response = openai.ChatCompletion.create(
|
77 |
model="gpt-3.5-turbo-16k",
|
78 |
messages=messages,
|
79 |
+
temperature=1,
|
80 |
max_tokens=2500,
|
81 |
top_p=1,
|
82 |
frequency_penalty=0,
|