Oysiyl commited on
Commit
d88a980
·
1 Parent(s): 3aedaf1

update app.py

Browse files
Files changed (1) hide show
  1. app.py +47 -5
app.py CHANGED
@@ -311,21 +311,30 @@ if __name__ == "__main__":
311
 
312
  # Start your Gradio app
313
  with gr.Blocks() as app:
314
- # Add a title
315
  gr.Markdown("# QR Code Art Generator")
 
 
 
 
 
 
 
 
 
316
 
317
  with gr.Row():
318
  with gr.Column():
319
  # Add inputs
320
  prompt_input = gr.Textbox(
321
  label="Prompt",
322
- placeholder="Enter your prompt here...",
323
- value="some clothes spread on ropes, realistic, great details, out in the open air sunny day realistic, great details,absence of people, Detailed and Intricate, CGI, Photoshoot,rim light, 8k, 16k, ultra detail"
324
  )
325
  url_input = gr.Textbox(
326
  label="URL for QR Code",
327
- placeholder="Enter URL to convert to QR code...",
328
- value="https://www.linkedin.com/in/dmytro-kisil/"
329
  )
330
  # The generate button
331
  generate_btn = gr.Button("Generate")
@@ -340,5 +349,38 @@ if __name__ == "__main__":
340
  inputs=[prompt_input, url_input],
341
  outputs=[output_image]
342
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  app.launch(share=False, mcp_server=True)
344
 
 
311
 
312
  # Start your Gradio app
313
  with gr.Blocks() as app:
314
+ # Add a title and description
315
  gr.Markdown("# QR Code Art Generator")
316
+ gr.Markdown("""
317
+ This is an AI-powered QR code generator that creates artistic QR codes using Stable Diffusion 1.5 and ControlNet models.
318
+ The application uses a custom ComfyUI workflow to generate QR codes.
319
+
320
+ ### Tips:
321
+ - Use detailed prompts for better results
322
+ - Include style keywords like 'photorealistic', 'detailed', '8k'
323
+ - Try the examples below for inspiration
324
+ """)
325
 
326
  with gr.Row():
327
  with gr.Column():
328
  # Add inputs
329
  prompt_input = gr.Textbox(
330
  label="Prompt",
331
+ placeholder="Describe the image you want to generate (check examples below for inspiration)",
332
+ value="Enter your prompt here... For example: 'a beautiful sunset over mountains, photorealistic, detailed landscape'"
333
  )
334
  url_input = gr.Textbox(
335
  label="URL for QR Code",
336
+ placeholder="Enter the URL you want to convert into a QR code (e.g., https://example.com)",
337
+ value="Enter your URL here... For example: https://github.com"
338
  )
339
  # The generate button
340
  generate_btn = gr.Button("Generate")
 
349
  inputs=[prompt_input, url_input],
350
  outputs=[output_image]
351
  )
352
+
353
+ # Add examples
354
+ examples = [
355
+ [
356
+ "some clothes spread on ropes, realistic, great details, out in the open air sunny day realistic, great details,absence of people, Detailed and Intricate, CGI, Photoshoot,rim light, 8k, 16k, ultra detail",
357
+ "https://www.google.com"
358
+ ],
359
+ [
360
+ "a beautiful sunset over mountains, photorealistic, detailed landscape, golden hour, dramatic lighting, 8k, ultra detailed",
361
+ "https://github.com"
362
+ ],
363
+ [
364
+ "underwater scene with coral reef and tropical fish, photorealistic, detailed, crystal clear water, sunlight rays, 8k, ultra detailed",
365
+ "https://twitter.com"
366
+ ],
367
+ [
368
+ "futuristic cityscape with flying cars and neon lights, cyberpunk style, detailed architecture, night scene, 8k, ultra detailed",
369
+ "https://linkedin.com"
370
+ ],
371
+ [
372
+ "vintage camera on wooden table, photorealistic, detailed textures, soft lighting, bokeh background, 8k, ultra detailed",
373
+ "https://instagram.com"
374
+ ]
375
+ ]
376
+
377
+ gr.Examples(
378
+ examples=examples,
379
+ inputs=[prompt_input, url_input],
380
+ outputs=[output_image],
381
+ fn=generate_qr_code,
382
+ cache_examples=True
383
+ )
384
+
385
  app.launch(share=False, mcp_server=True)
386