akhaliq HF staff commited on
Commit
167906a
·
verified ·
1 Parent(s): 82939de

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +59 -7
index.html CHANGED
@@ -22,13 +22,65 @@ async def generate_fortune(name):
22
 
23
  return f"{name.strip()}, your fortune: In the near future, you will{fortune}"
24
 
25
- with gr.Blocks(title="AI Fortune Cookie Generator") as demo:
26
- gr.Markdown("# 🥠 AI Fortune Cookie Generator")
27
- gr.Markdown("Enter your name and receive a personalized AI-generated fortune!")
28
-
29
- name_input = gr.Textbox(label="Your Name")
30
- fortune_output = gr.Textbox(label="Your AI-Generated Fortune")
31
- submit_button = gr.Button("🔮 Reveal Your Fortune")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  submit_button.click(fn=generate_fortune, inputs=name_input, outputs=fortune_output)
34
 
 
22
 
23
  return f"{name.strip()}, your fortune: In the near future, you will{fortune}"
24
 
25
+ # Custom CSS for a more appealing look
26
+ custom_css = """
27
+ .container {
28
+ max-width: 800px !important;
29
+ margin: auto !important;
30
+ padding: 20px !important;
31
+ }
32
+ .title {
33
+ text-align: center !important;
34
+ color: #FF6B6B !important;
35
+ font-size: 2.5rem !important;
36
+ margin-bottom: 20px !important;
37
+ }
38
+ .subtitle {
39
+ text-align: center !important;
40
+ color: #4ECDC4 !important;
41
+ font-size: 1.2rem !important;
42
+ margin-bottom: 30px !important;
43
+ }
44
+ .input-box, .output-box {
45
+ border: 2px solid #FF6B6B !important;
46
+ border-radius: 10px !important;
47
+ }
48
+ .generate-btn {
49
+ background-color: #FF6B6B !important;
50
+ color: white !important;
51
+ font-size: 1.2rem !important;
52
+ padding: 10px 20px !important;
53
+ border-radius: 20px !important;
54
+ transition: all 0.3s ease !important;
55
+ }
56
+ .generate-btn:hover {
57
+ background-color: #4ECDC4 !important;
58
+ transform: scale(1.05) !important;
59
+ }
60
+ .footer {
61
+ text-align: center !important;
62
+ margin-top: 30px !important;
63
+ font-style: italic !important;
64
+ }
65
+ """
66
+
67
+ with gr.Blocks(
68
+ title="🥠 Viral Fortune Cookie Generator",
69
+ theme=gr.themes.Soft(
70
+ primary_hue="pink",
71
+ secondary_hue="blue",
72
+ ),
73
+ css=custom_css
74
+ ) as demo:
75
+ with gr.Column(elem_classes="container"):
76
+ gr.Markdown("# 🥠 AI Fortune Cookie Generator", elem_classes="title")
77
+ gr.Markdown("Discover your future with our AI-powered fortune cookies! Share your unique fortune with friends!", elem_classes="subtitle")
78
+
79
+ name_input = gr.Textbox(label="Your Name", placeholder="Enter your name here...", elem_classes="input-box")
80
+ fortune_output = gr.Textbox(label="Your AI-Generated Fortune", elem_classes="output-box", lines=3)
81
+ submit_button = gr.Button("🔮 Reveal Your Cosmic Fortune", elem_classes="generate-btn")
82
+
83
+ gr.Markdown("Share your fortune on social media and tag us! #AIFortuneCookie", elem_classes="footer")
84
 
85
  submit_button.click(fn=generate_fortune, inputs=name_input, outputs=fortune_output)
86