Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -195,17 +195,15 @@ def artikel_processing(link_scrap,backlink,keyword,openai_key,replicate_key):
|
|
195 |
response = openai.ChatCompletion.create(
|
196 |
model ="gpt-3.5-turbo",
|
197 |
messages=[
|
198 |
-
{"role": "system", "content": """You are a very professional article editor and perform SEO optimization on an article with utmost professionalism. berikut adalah SOP SEO yang harus kamu terapkan
|
199 |
1. meta decription max 160 characters
|
200 |
-
2.
|
201 |
-
3.
|
202 |
-
4.
|
203 |
-
5.
|
204 |
-
6. focus keyword harus ada di
|
205 |
-
7. focus keyword harus ada di
|
206 |
-
8. focus keyword harus ada di
|
207 |
-
9. focus keyword harus ada di url
|
208 |
-
10. focus keyword harus ada di intro
|
209 |
"""},
|
210 |
{"role": "user", "content": "Paraphrase the above article to make it a well-written and easily understandable piece for humans, following the conventions of renowned articles.The paraphrased result should be more than 2500 characters and less than 7000 characters. and then perform SEO optimization on the following article:\n" + i + "\nPlease ensure the usage of proper and correct Indonesian language. \nDo not write any explanation and any pleasantries. Provide only the reformatted article using this format: {reformatted article}"}
|
211 |
],
|
@@ -228,21 +226,19 @@ def artikel_processing(link_scrap,backlink,keyword,openai_key,replicate_key):
|
|
228 |
5. Subheadings: The use of subheadings should help readers follow the flow of the article and understand key points more easily.
|
229 |
6. Citations and Sources: The blog should cite reliable sources.
|
230 |
7. Graphics: The blog should use graphics to visualize data clearly.
|
231 |
-
8. SEO Keywords: Use keywords that will help the blog become more discoverable in search results.
|
232 |
9. Conclusion: The blog should also have a clear conclusion that summarizes the core findings of the study.
|
233 |
10. Final Thought: You should conclude the blog by providing readers with broader insights on the topic.
|
234 |
-
11. meta decription max 160
|
235 |
-
12.
|
236 |
-
13.
|
237 |
-
14.
|
238 |
-
15.
|
239 |
-
16. focus keyword harus ada di
|
240 |
-
17. focus keyword harus ada di
|
241 |
-
18. focus keyword harus ada di
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
Here is the article that you need to edit to adhere to these 20 criteria: {i}
|
246 |
Please do not change the existing format in the article, just adjust the writing style according to the 10 criteria I mentioned.
|
247 |
""" },
|
248 |
{"role": "user", "content": "Please ensure the usage of proper and correct Indonesian language. \nDo not write any explanation and any pleasantries. Provide only the rewrited article using this format: {rewrited article}"}
|
@@ -271,7 +267,7 @@ def artikel_processing(link_scrap,backlink,keyword,openai_key,replicate_key):
|
|
271 |
model ="gpt-3.5-turbo",
|
272 |
messages=[
|
273 |
{"role": "system", "content": "You are a professional article editor machine."},
|
274 |
-
{"role": "user", "content": "Please edit the given article:\n" + "\n" + i + f"\nAdd annotations to the words with the keywords {keyword} to format them as links in the HTML structure.the link should be connected to {backlink} \nThe format should be like this: <a title={keyword} href={backlink}>{keyword}</a>. YOU MUST Do this FORMAT ONLY for the first 3 keywords that appear and MUST be on different keywords, IF a keyword appears more than twice then simply ignored it by not adding any links to those keywords. Do not combine two keyword into one or modify any keyword. You only have less than 3 attempts to do this, no more than that in order to keep the article neat and clean. \nExcept for the terms
|
275 |
],
|
276 |
temperature = 0
|
277 |
)
|
|
|
195 |
response = openai.ChatCompletion.create(
|
196 |
model ="gpt-3.5-turbo",
|
197 |
messages=[
|
198 |
+
{"role": "system", "content": f"""You are a very professional article editor and perform SEO optimization on an article with utmost professionalism. berikut adalah SOP SEO yang harus kamu terapkan
|
199 |
1. meta decription max 160 characters
|
200 |
+
2. sentences max 20 words
|
201 |
+
3. paragraph max 300 words
|
202 |
+
4. focus keyword {keyword} harus ada di content
|
203 |
+
5. focus keyword {keyword} harus ada di intro
|
204 |
+
6. focus keyword {keyword} harus ada di meta desccripton
|
205 |
+
7. focus keyword {keyword} harus ada di url
|
206 |
+
8. focus keyword {keyword} harus ada di intro
|
|
|
|
|
207 |
"""},
|
208 |
{"role": "user", "content": "Paraphrase the above article to make it a well-written and easily understandable piece for humans, following the conventions of renowned articles.The paraphrased result should be more than 2500 characters and less than 7000 characters. and then perform SEO optimization on the following article:\n" + i + "\nPlease ensure the usage of proper and correct Indonesian language. \nDo not write any explanation and any pleasantries. Provide only the reformatted article using this format: {reformatted article}"}
|
209 |
],
|
|
|
226 |
5. Subheadings: The use of subheadings should help readers follow the flow of the article and understand key points more easily.
|
227 |
6. Citations and Sources: The blog should cite reliable sources.
|
228 |
7. Graphics: The blog should use graphics to visualize data clearly.
|
229 |
+
8. SEO Keywords: Use keyword {keywords} that will help the blog become more discoverable in search results.
|
230 |
9. Conclusion: The blog should also have a clear conclusion that summarizes the core findings of the study.
|
231 |
10. Final Thought: You should conclude the blog by providing readers with broader insights on the topic.
|
232 |
+
11. meta decription max 160 character
|
233 |
+
12. sentences max 20 words
|
234 |
+
13. paragraph max 300 words
|
235 |
+
14. focus keyword {keyword} harus ada di content
|
236 |
+
15. focus keyword {keyword} harus ada di intro
|
237 |
+
16. focus keyword {keyword} harus ada di meta desccripton
|
238 |
+
17. focus keyword {keyword} harus ada di url
|
239 |
+
18. focus keyword {keyword} harus ada di intro
|
240 |
+
|
241 |
+
Here is the article that you need to edit to adhere to these 18 criteria: {i}
|
|
|
|
|
242 |
Please do not change the existing format in the article, just adjust the writing style according to the 10 criteria I mentioned.
|
243 |
""" },
|
244 |
{"role": "user", "content": "Please ensure the usage of proper and correct Indonesian language. \nDo not write any explanation and any pleasantries. Provide only the rewrited article using this format: {rewrited article}"}
|
|
|
267 |
model ="gpt-3.5-turbo",
|
268 |
messages=[
|
269 |
{"role": "system", "content": "You are a professional article editor machine."},
|
270 |
+
{"role": "user", "content": "Please edit the given article:\n" + "\n" + i + f"\nAdd annotations to the words with the keywords {keyword} to format them as links in the HTML structure.the link should be connected to {backlink} \nThe format should be like this: <a title={keyword} href={backlink}>{keyword}</a>. YOU MUST Do this FORMAT ONLY for the first 3 keywords that appear and MUST be on different keywords, IF a keyword appears more than twice then simply ignored it by not adding any links to those keywords. Do not combine two keyword into one or modify any keyword. You only have less than 3 attempts to do this, no more than that in order to keep the article neat and clean. \nExcept for the terms {keyword} you are prohibited from providing backlinks. Additionally, you are not allowed to include backlinks to individuals' names or technology company names such as Google, Microsoft, and others. \nYou only have less than 3 attempts to do this, no more than that in order to keep the article neat and clean.\nPlease ensure the usage of proper and correct Indonesian language. \nDo not write any explanation and any pleasantries."+"Provide only the reformatted article using this format: {new_formatted_article}"}
|
271 |
],
|
272 |
temperature = 0
|
273 |
)
|