Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -65,15 +65,15 @@ def extract_info(output_text):
|
|
65 |
def format_cocktail_output(name, quote, ingredients, instruction, notes):
|
66 |
# Construct the HTML output
|
67 |
html_output = f'''
|
68 |
-
<div style="text-align: center; font-family: '
|
69 |
<h1 style="font-size: 48px; color: white;">{name}</h1>
|
70 |
<p style="font-size: 36px; margin-top: -15px; font-style: italic; color: white;">{quote}</p>
|
71 |
<p style="font-size: 20px; color: white;">
|
72 |
-
<strong>Ingredients:</strong><br>
|
73 |
{ingredients}<br>
|
74 |
-
<strong>Instruction:</strong><br>
|
75 |
{instruction}<br>
|
76 |
-
<strong>Notes:</strong><br>
|
77 |
{notes}<br>
|
78 |
</p>
|
79 |
</div>
|
@@ -88,6 +88,22 @@ with gr.Blocks(css='''
|
|
88 |
.gradio-textbox {
|
89 |
opacity: 0.5; /* Change the opacity of the textbox */
|
90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
''') as demo:
|
92 |
with gr.Row():
|
93 |
gr.HTML("""
|
@@ -111,11 +127,9 @@ with gr.Blocks(css='''
|
|
111 |
# flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"])
|
112 |
# drinking_experience = gr.CheckboxGroup(label="Drinking Experience", choices=["Refreshing", "Warming", "Comforting", "Energizing", "Relaxing"])
|
113 |
with gr.Row():
|
114 |
-
allergies = gr.Textbox(label="Allergies")
|
115 |
-
additional_requests = gr.Textbox(label="Anything else you would like to address")
|
116 |
-
|
117 |
-
with gr.Row():
|
118 |
-
generate_button = gr.Button("Generate Your Cocktail Recipe")
|
119 |
|
120 |
with gr.Row():
|
121 |
output_recipe = gr.HTML(label="Your Cocktail Recipe")
|
|
|
65 |
def format_cocktail_output(name, quote, ingredients, instruction, notes):
|
66 |
# Construct the HTML output
|
67 |
html_output = f'''
|
68 |
+
<div style="text-align: center; font-family: 'Apple Chancery', cursive; color: white;">
|
69 |
<h1 style="font-size: 48px; color: white;">{name}</h1>
|
70 |
<p style="font-size: 36px; margin-top: -15px; font-style: italic; color: white;">{quote}</p>
|
71 |
<p style="font-size: 20px; color: white;">
|
72 |
+
<strong style="color: white;">Ingredients:</strong><br>
|
73 |
{ingredients}<br>
|
74 |
+
<strong style="color: white;">Instruction:</strong><br>
|
75 |
{instruction}<br>
|
76 |
+
<strong style="color: white;">Notes:</strong><br>
|
77 |
{notes}<br>
|
78 |
</p>
|
79 |
</div>
|
|
|
88 |
.gradio-textbox {
|
89 |
opacity: 0.5; /* Change the opacity of the textbox */
|
90 |
}
|
91 |
+
.generate-button {
|
92 |
+
background: linear-gradient(to right, #F0E68C, #E0FFFF, #FF6347);
|
93 |
+
color: white;
|
94 |
+
padding: 10px 20px;
|
95 |
+
border: none;
|
96 |
+
border-radius: 5px;
|
97 |
+
cursor: pointer;
|
98 |
+
font-weight: bold;
|
99 |
+
text-transform: uppercase;
|
100 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
101 |
+
transition: all 0.3s ease;
|
102 |
+
}
|
103 |
+
.generate-button:hover {
|
104 |
+
background: linear-gradient(to right, #E0FFFF, #FF6347, #F0E68C);
|
105 |
+
box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
|
106 |
+
}
|
107 |
''') as demo:
|
108 |
with gr.Row():
|
109 |
gr.HTML("""
|
|
|
127 |
# flavor_association = gr.CheckboxGroup(label="Flavor Association", choices=["Fruity", "Herbal", "Spicy", "Floral", "Nutty", "Woody", "Earthy"])
|
128 |
# drinking_experience = gr.CheckboxGroup(label="Drinking Experience", choices=["Refreshing", "Warming", "Comforting", "Energizing", "Relaxing"])
|
129 |
with gr.Row():
|
130 |
+
allergies = gr.Textbox(label="Allergies", scale=2)
|
131 |
+
additional_requests = gr.Textbox(label="Anything else you would like to address", scale=2)
|
132 |
+
generate_button = gr.Button("Generate Your Cocktail Recipe", scale=1, elem_classes=["generate-button"])
|
|
|
|
|
133 |
|
134 |
with gr.Row():
|
135 |
output_recipe = gr.HTML(label="Your Cocktail Recipe")
|