abhishekt commited on
Commit
f916941
·
1 Parent(s): 9245853
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -9,9 +9,9 @@ openai.api_key = os.environ["api"]
9
  # Define the function that generates the blog article
10
  def generate_article(topic):
11
  # Use OpenAI's GPT-3 to generate the article
12
- prompt = f"Write a blog post about {topic} with 5 different sections."
13
  response = openai.Completion.create(
14
- engine="text-davinci-002",
15
  prompt=prompt,
16
  max_tokens=2048,
17
  n=1,
@@ -41,7 +41,6 @@ iface = gr.Interface(
41
  inputs=gr.inputs.Textbox("Enter a topic for your blog post"),
42
  outputs=gr.outputs.HTML(),
43
  title="Blog Post Generator",
44
- description="Generate a blog post on a given topic with 5 different sections using OpenAI's GPT-3 text model.",
45
  )
46
 
47
  # Launch the interface
 
9
  # Define the function that generates the blog article
10
  def generate_article(topic):
11
  # Use OpenAI's GPT-3 to generate the article
12
+ prompt = f"Write a blog about {topic} with required sections with titles and the article should be interesting and factual and minimum of 500 words"
13
  response = openai.Completion.create(
14
+ engine="text-davinci-003",
15
  prompt=prompt,
16
  max_tokens=2048,
17
  n=1,
 
41
  inputs=gr.inputs.Textbox("Enter a topic for your blog post"),
42
  outputs=gr.outputs.HTML(),
43
  title="Blog Post Generator",
 
44
  )
45
 
46
  # Launch the interface