samisnotmyname commited on
Commit
0fa0f42
1 Parent(s): 7602122

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def prompt(topic_name, link, writing_style, age):
4
+ 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."
5
+
6
+ inputs = [
7
+ gr.inputs.Textbox(label='Topic Name'),
8
+ gr.inputs.Textbox(label='Link'),
9
+ 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'),
10
+ gr.inputs.Slider(18, 50 ,step=1, label='Targeting audience of age between')
11
+ ]
12
+
13
+ output = gr.outputs.Textbox()
14
+
15
+ gr.Interface(fn=prompt, inputs=inputs, outputs=output, title='Instagram Carousel Prompt Generator').launch(share=True)