Spaces:
Sleeping
Sleeping
| from create import create_gtm,create_usp,create_uvp,create_buyers_persona,set_openai_api_key | |
| import gradio as gr # oh yeah! | |
| with gr.Blocks(theme="Ocean", title="Complete GTM Strategy") as ui: | |
| api_key_state = gr.State() | |
| with gr.Row(): | |
| API=gr.Textbox(label="Enter OpenAI API key") | |
| set_api=gr.Button("Set API key") | |
| showAPI=gr.Text() | |
| set_api.click(fn=set_openai_api_key, inputs=[API], outputs=[api_key_state,showAPI]) | |
| with gr.Row(): | |
| with gr.Column(): | |
| with gr.Row(): | |
| gr.Text(label="prompt", value="Act like a world class market research specialist. I want to promote {product} at {location}. Share a list of segments, potential geographies, decision-makers should target building a GTM strategy. Please give me the output in tabular format. Sort the segments in the decreasing order of the market size & demand") | |
| with gr.Row(): | |
| product=gr.Textbox(label="product") | |
| location=gr.Textbox(label="location") | |
| button1=gr.Button("Generate GTM Strategy") | |
| with gr.Column(): | |
| output_text1=gr.Markdown(height=400, max_height=400, show_copy_button=True, label="GTM", show_label=True) | |
| button1.click(fn=create_gtm, scroll_to_output=True ,inputs=[api_key_state,product,location], outputs=output_text1) | |
| with gr.Row(): | |
| with gr.Column(): | |
| with gr.Row(): | |
| gr.Text(label="prompt", value="Act like a World Class market Research Specilaist and do the task. I am selling {product} to {segment} at {location}. Build a Buyers Persona in tabular format classify the information based on Demography, Geo, Psychography, Behavior, also add buying barriers and buying triggers, Keywords they browse, Things they want to change, Their fear, etc.") | |
| with gr.Row(): | |
| segment=gr.Textbox(label="segment") | |
| button2=gr.Button("Create Buyers Persona") | |
| with gr.Column(): | |
| output_text2=gr.Markdown(height=400, max_height=400, show_copy_button=True) | |
| button2.click(fn=create_buyers_persona, scroll_to_output=True ,inputs=[api_key_state,product,location,segment], outputs=output_text2) | |
| with gr.Row(): | |
| with gr.Column(): | |
| with gr.Row(): | |
| gr.Text(label="prompt", value="I am selling {product} to {segment} in {location} I want you to act as a Marketing expert specializing in creating unique value propositions for {product} targeted to {segment} Craft a compelling and concise unique value proposition statement under 200 characters that highlights how to achieve {goal} without {problem} by utilizing {solution}.") | |
| with gr.Row(): | |
| goal=gr.Textbox(label="goal") | |
| problem=gr.Textbox(label="problem") | |
| solution=gr.Textbox(label="solution") | |
| button2=gr.Button("Create UVP") | |
| with gr.Column(): | |
| output_text2=gr.Markdown(height=200, max_height=200, show_copy_button=True) | |
| button2.click(fn=create_uvp, scroll_to_output=True ,inputs=[api_key_state,product,location,segment,goal,problem,solution], outputs=output_text2) | |
| with gr.Row(): | |
| with gr.Column(): | |
| with gr.Row(): | |
| gr.Text(label="prompt", value="My product is {product} selling to {segment} at {location} Please give the list of USPs & Group the USPs under 7Ps of Marketing.") | |
| button2=gr.Button("Create USP") | |
| with gr.Column(): | |
| output_text2=gr.Markdown(height=400, max_height=400, show_copy_button=True) | |
| button2.click(fn=create_usp, scroll_to_output=True ,inputs=[api_key_state,product,location,segment], outputs=output_text2) | |
| ui.launch(inbrowser=True) |