Spaces:
Sleeping
Sleeping
Download app.py from hmb/worldcupworkflow: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/hmb/worldcupworkflow/resolve/main/app.py
- Command line
-
hf download hf://spaces/hmb/worldcupworkflow/app.py
-
curl -L -o app.py https://huggingface.co/spaces/hmb/worldcupworkflow/resolve/main/app.py
1.05 kB
| 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() | |