Harsh051015 commited on
Commit
3424ade
·
verified ·
1 Parent(s): 664e5d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -11
app.py CHANGED
@@ -48,33 +48,51 @@ def main():
48
 
49
 
50
 
51
- title_prompt= f""" You are a good news journalist. Here is the article {article}.
52
- Your task is to generate multiple Headlines, Descriptions, and URL slugs.
53
- Your response needs to be included within the article.
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  =========================
55
  Response must be like-
 
56
  Headlines:
57
- 1.
58
- 2.
59
  ....
 
60
  Descriptions:
61
- 1.
62
- 2.
63
  ....
 
64
  URL Slugs:
65
- 1.
66
- 2.
67
  ....
 
 
 
68
  ==========================
69
  Restrictions:
70
  1. Don't provide any explanation or details
71
  """
72
 
73
 
74
-
75
  if st.button("Submit"):
76
  if article.strip():
77
- synthesized_article = openaifunction(title_prompt,max_tokens=700, temperature=0.3)
78
  st.subheader("Article Metadata")
79
  st.write(synthesized_article)
80
  else:
 
48
 
49
 
50
 
51
+ title_prompt= f""" You are a good news journalist. Here is the article {article}. \n
52
+ Your task is to generate multiple Headlines, Descriptions, and URL slugs.\n
53
+ Your response needs to be included within the article.\n
54
+ =========================
55
+ Instructions:
56
+ 1. The objective is to provide one-sentence headlines without using a colon to connect two sentences.
57
+
58
+ 2. It's advisable to aim for headlines 60-80 characters for optimal results. Please ensure that the generated headline aligns with Google's guidelines for headline length.
59
+
60
+ 3.please verify that the description adheres to Google's guidelines for description length:
61
+ Target: Aim for descriptions between 50-160 characters. This range ensures that your description remains informative even if truncated.
62
+ Focus: Clearly describe the content's value to the user.
63
+ Truncation: Be aware that Google might opt to use content from your webpage instead of your description if it's deemed more relevant.
64
+
65
+ 4. Please generate engaging text for a Twitter post under 280 characters, sharing the link to this article (with a placeholder for the link). This tweet should use emojis to captivate attention and emphasize key points.
66
+
67
  =========================
68
  Response must be like-
69
+ \n
70
  Headlines:
71
+ \n1.
72
+ \n2.
73
  ....
74
+ \n
75
  Descriptions:
76
+ \n1.
77
+ \n2.
78
  ....
79
+ \n
80
  URL Slugs:
81
+ \n1.
82
+ \n2.
83
  ....
84
+ Twitter Post:
85
+ \n 1.
86
+
87
  ==========================
88
  Restrictions:
89
  1. Don't provide any explanation or details
90
  """
91
 
92
 
 
93
  if st.button("Submit"):
94
  if article.strip():
95
+ synthesized_article = openaifunction(title_prompt,max_tokens=800, temperature=0.3)
96
  st.subheader("Article Metadata")
97
  st.write(synthesized_article)
98
  else: