Gpt-3 Analytics App
I created a YouTube analytics app with gpt-3 which gives me the result in bullet format. I want the output in list format.
Flask
My code:-
@app.route("/title-generation/", methods=("GET", "POST"))
def title_generator():
if request.method == "POST":
keyword = request.form["keyword"]
response = openai.Completion.create(
model="text-davinci-002",
prompt= generate_prompt(keyword),
#prompt="Give some ideas combining Minecraft, game, python, and coding:",
temperature=0.31,
max_tokens=150,
top_p=1,
best_of=20,
frequency_penalty=1,
presence_penalty=1
)
return redirect(url_for("title_generator", result=response.choices[0].text))
result = request.args.get("result")
return render_template("./title.html", result=result)
def generate_prompt(keyword):
return """Give some ideas combining {}""".format(
keyword.capitalize()
)
Here I want result in list format.
It’s showing as this:
-Create a custom Minecraft mod using Python -Write a Python script to automatically generate Minecraft worlds -Design a mini-game in Minecraft that can only be played by writing Python code>
Please resolve this problem!