Update app.py
Browse files
app.py
CHANGED
@@ -44,24 +44,24 @@ def generate_meme(prompt: str, style: str):
|
|
44 |
print(f"Generation error: {e}")
|
45 |
return None
|
46 |
|
47 |
-
# Build UI
|
48 |
with gr.Blocks(title="π Viral Meme Generator", css="static/style.css") as demo:
|
49 |
gr.Markdown("# <center>π₯ Create Viral Memes in Seconds</center>")
|
50 |
|
51 |
-
with gr.Row(
|
52 |
with gr.Column(scale=3):
|
53 |
-
gr.HTML('<img src="file/static/assets/logo.png"
|
54 |
trend_select = gr.Dropdown(get_trends(), label="Trending Topics")
|
55 |
style_select = gr.Dropdown(STYLES, label="Visual Style", value="Realistic")
|
56 |
text_input = gr.Textbox(label="Your Message", placeholder="Add funny text...")
|
57 |
generate_btn = gr.Button("Generate Now", variant="primary")
|
58 |
|
59 |
with gr.Column(scale=2):
|
60 |
-
output_img = gr.Image(label="Your Meme",
|
61 |
gr.HTML("""
|
62 |
<div class="monetization">
|
63 |
<script type='text/javascript' src='https://storage.ko-fi.com/cdn/widget/Widget_2.js'></script>
|
64 |
-
<script type='text/javascript'>kofiwidget2.init('Support Us', '#FF5F5F', '
|
65 |
</div>
|
66 |
""")
|
67 |
download_btn = gr.Button("π Unlock HD Download ($0.99)")
|
|
|
44 |
print(f"Generation error: {e}")
|
45 |
return None
|
46 |
|
47 |
+
# Build UI with fixed parameters
|
48 |
with gr.Blocks(title="π Viral Meme Generator", css="static/style.css") as demo:
|
49 |
gr.Markdown("# <center>π₯ Create Viral Memes in Seconds</center>")
|
50 |
|
51 |
+
with gr.Row(): # Removed invalid 'variant' parameter
|
52 |
with gr.Column(scale=3):
|
53 |
+
gr.HTML('<img src="file/static/assets/logo.png" style="height: 200px">') # Fixed image sizing
|
54 |
trend_select = gr.Dropdown(get_trends(), label="Trending Topics")
|
55 |
style_select = gr.Dropdown(STYLES, label="Visual Style", value="Realistic")
|
56 |
text_input = gr.Textbox(label="Your Message", placeholder="Add funny text...")
|
57 |
generate_btn = gr.Button("Generate Now", variant="primary")
|
58 |
|
59 |
with gr.Column(scale=2):
|
60 |
+
output_img = gr.Image(label="Your Meme", height=512, width=512) # Fixed height/width
|
61 |
gr.HTML("""
|
62 |
<div class="monetization">
|
63 |
<script type='text/javascript' src='https://storage.ko-fi.com/cdn/widget/Widget_2.js'></script>
|
64 |
+
<script type='text/javascript'>kofiwidget2.init('Support Us', '#FF5F5F', 'K3K8L7L7S');kofiwidget2.draw();</script>
|
65 |
</div>
|
66 |
""")
|
67 |
download_btn = gr.Button("π Unlock HD Download ($0.99)")
|