File size: 2,199 Bytes
0fa0f42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr

def prompt(topic_name, link, writing_style, age):
    return f"Using a {writing_style} writing style and targeting an audience of age between 18 to {age}, using this link {link} and create Instagram carousel content on {topic_name} with the following specifications: \nTitle: Choose an attention-grabbing title for your carousel consisting of 4 to 5 words and 25 characters maximum. \nSubtopics: \n1. Subtopic: Brief heading (1-3 words) \nExplanation: Provide a concise 2-3 line description (up to 50 words) highlighting the key benefits offered by {topic_name}. Use this link {link} to gather relevant information. \n2. Subtopic: Brief heading (1-4 words) \nExplanation: Present a succinct 2-3 line description (up to 50 words) emphasizing the advantages and unique features of {topic_name}. Utilize this link {link} to collect valuable insights. \n3. Subtopic: Brief heading (1-4 words) \nExplanation: Convey a concise 2-3 line description (up to 50 words) showcasing the ways in which {topic_name} enhances and enriches the user experience. Refer to this link {link} for further details. \n4. Subtopic: Brief heading (1-4 words) \nExplanation: Outline a compact 2-3 line description (up to 50 words) underscoring the practical benefits and applications of {topic_name}. Access this link {link} to explore additional information. \n5. Subtopic: Brief heading (1-4 words) \nExplanation: Summarize the key advantages and standout features of {topic_name} in a concise 2-3 line description (up to 50 words). Visit this link {link} for more in-depth insights."

inputs = [
    gr.inputs.Textbox(label='Topic Name'),
    gr.inputs.Textbox(label='Link'),
    gr.inputs.Dropdown(["Conversational", "Bold and Punchy", "Inspirational", "Storytelling", "Playful and Humorous", "Descriptive and Visual", "Informative and Educational", "Minimalist ", "Trendy and Pop Culture ", "Trendy and Pop Culture", "Aspirational Lifestyle"], label='Writing Style'),
    gr.inputs.Slider(18, 50 ,step=1, label='Targeting audience of age between')
]

output = gr.outputs.Textbox()

gr.Interface(fn=prompt, inputs=inputs, outputs=output, title='Instagram Carousel Prompt Generator').launch(share=True)