Spaces:
Running
Running
Harsh051015
commited on
Commit
•
7c32a2b
1
Parent(s):
e0e76b1
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def openaifunction(prompt,max_tokens=4000, temperature=0.3):
|
|
21 |
response = client.chat.completions.create(
|
22 |
model=deployment_name,
|
23 |
messages=[
|
24 |
-
{"role": "system", "content": "you are a good
|
25 |
{"role": "user", "content": [
|
26 |
{
|
27 |
"type": "text",
|
@@ -43,7 +43,7 @@ def openaifunction(prompt,max_tokens=4000, temperature=0.3):
|
|
43 |
def main():
|
44 |
st.title("Article")
|
45 |
|
46 |
-
# Text input boxes for user to input articles
|
47 |
article = st.text_area("Enter Article ")
|
48 |
|
49 |
|
@@ -55,17 +55,17 @@ def main():
|
|
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.
|
61 |
-
Target: Aim for descriptions between
|
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 |
-
|
69 |
\n
|
70 |
Headlines:
|
71 |
\n1.
|
|
|
21 |
response = client.chat.completions.create(
|
22 |
model=deployment_name,
|
23 |
messages=[
|
24 |
+
{"role": "system", "content": "you are a good assistant."},
|
25 |
{"role": "user", "content": [
|
26 |
{
|
27 |
"type": "text",
|
|
|
43 |
def main():
|
44 |
st.title("Article")
|
45 |
|
46 |
+
# Text input boxes for the user to input articles
|
47 |
article = st.text_area("Enter Article ")
|
48 |
|
49 |
|
|
|
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 of 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 120-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 |
+
The response must be like-
|
69 |
\n
|
70 |
Headlines:
|
71 |
\n1.
|