Spaces:
Sleeping
Sleeping
Emily Witko commited on
Commit ·
8d0f7fd
1
Parent(s): dd08119
update app
Browse files
app.py
CHANGED
|
@@ -1,7 +1,33 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import random
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
actions = [
|
| 5 |
+
"Charge $5/month for",
|
| 6 |
+
"Launch an enterprise tier for",
|
| 7 |
+
"Create a premium API for",
|
| 8 |
+
"Sell sponsorships on",
|
| 9 |
+
]
|
| 10 |
|
| 11 |
+
things = [
|
| 12 |
+
"model cards with personality",
|
| 13 |
+
"leaderboards",
|
| 14 |
+
"Spaces with >100 likes",
|
| 15 |
+
]
|
| 16 |
+
|
| 17 |
+
twists = [
|
| 18 |
+
"but pricing is based on vibes",
|
| 19 |
+
"and call it 'Pro Max Ultra'",
|
| 20 |
+
"but it's secretly very useful",
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
def generate_idea():
|
| 24 |
+
return f"{random.choice(actions)} {random.choice(things)} {random.choice(twists)}."
|
| 25 |
+
|
| 26 |
+
with gr.Blocks() as demo:
|
| 27 |
+
gr.Markdown("# 🤗 Hugging Face Monetization Generator")
|
| 28 |
+
output = gr.Textbox(label="Your next big idea")
|
| 29 |
+
|
| 30 |
+
btn = gr.Button("Generate idea")
|
| 31 |
+
btn.click(fn=generate_idea, inputs=None, outputs=output)
|
| 32 |
+
|
| 33 |
+
demo.launch()
|