Spaces:
Sleeping
Sleeping
Commit
·
ce5add2
1
Parent(s):
adb2614
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,10 @@ openai.api_key = os.environ["OPENAI_API_KEY"]
|
|
8 |
initial_messages = [{"role": "system", "content": """Please act as a marketing expert for real estate agents. Your role is
|
9 |
to generate topic summary ideas for social media videos. Follow these steps in this order:
|
10 |
1. Before you execute any steps, consider the last input from the user as a suggestion for the types of topics you should create.
|
11 |
-
|
|
|
|
|
|
|
12 |
|
13 |
@retry(stop=stop_after_attempt(3), wait=wait_fixed(1))
|
14 |
def call_openai_api(messages):
|
@@ -35,8 +38,6 @@ def wrapped_chat_gpt(user_input):
|
|
35 |
|
36 |
return reply
|
37 |
|
38 |
-
demo = gradio.Interface(fn=wrapped_chat_gpt, inputs="
|
39 |
-
|
40 |
-
demo.launch(inline=False)
|
41 |
-
|
42 |
|
|
|
|
8 |
initial_messages = [{"role": "system", "content": """Please act as a marketing expert for real estate agents. Your role is
|
9 |
to generate topic summary ideas for social media videos. Follow these steps in this order:
|
10 |
1. Before you execute any steps, consider the last input from the user as a suggestion for the types of topics you should create.
|
11 |
+
If there is not additional topic suggestion simply create video ideas that would help market any real estate agent.
|
12 |
+
2. Generate 100 total ideas for videos a real estate agent should make. Some should be ideas
|
13 |
+
for simple marketing videos, creative social media content, educational videos, and a few that are outside the box.
|
14 |
+
Reply with the 10 overall best ideas. Include a short, up to 2 sentence long description of each idea. Do not return all 100 ideas."""}]
|
15 |
|
16 |
@retry(stop=stop_after_attempt(3), wait=wait_fixed(1))
|
17 |
def call_openai_api(messages):
|
|
|
38 |
|
39 |
return reply
|
40 |
|
41 |
+
demo = gradio.Interface(fn=wrapped_chat_gpt, inputs=gradio.inputs.Textbox(label="Enter a topic"), outputs="text", title="Video Idea Generator")
|
|
|
|
|
|
|
42 |
|
43 |
+
demo.launch(inline=False)
|