Spaces:
Sleeping
Sleeping
File size: 1,054 Bytes
8ececae 9e9dd6a 124a09a 9e9dd6a 124a09a 9e9dd6a 124a09a 8ececae 124a09a 9e9dd6a 124a09a 8ececae 9e9dd6a 124a09a 9e9dd6a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | import gradio as gr
def format_prompts(moment: str) -> tuple[str, str, str, str]:
tweet = (
f"Write a punchy viral tweet — max 240 chars, 2-3 emojis, end with "
f"#WorldCup2026, output ONLY the tweet text:\n\n{moment}"
)
instagram = (
f"Write an Instagram caption — strong hook on the first line, 3-4 vivid "
f"emotional sentences, then 12-15 hashtags on a new line:\n\n{moment}"
)
linkedin = (
f"Write a LinkedIn post — bold opening statement, use this sports moment as a "
f"lens for leadership or teamwork, 150-200 words, no hashtags, end with a "
f"question to drive comments:\n\n{moment}"
)
scene = (
f"One sentence only, starting with 'Transform into a cinematic World Cup 2026 "
f"poster,' — describe the visual for this moment:\n\n{moment}"
)
return tweet, instagram, linkedin, scene
demo = gr.Workflow(
graph="workflow.json",
bind={"Prompt Formatter": format_prompts},
)
if __name__ == "__main__":
demo.launch()
|