Emily Witko commited on
Commit
8d0f7fd
·
1 Parent(s): dd08119

update app

Browse files
Files changed (1) hide show
  1. app.py +30 -4
app.py CHANGED
@@ -1,7 +1,33 @@
 
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
5
 
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()