Timtical commited on
Commit
7c538d0
·
verified ·
1 Parent(s): e6f96bb

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +16 -13
  2. app.py +21 -0
README.md CHANGED
@@ -1,13 +1,16 @@
1
- ---
2
- title: Character Creation Ai
3
- emoji: 🚀
4
- colorFrom: gray
5
- colorTo: indigo
6
- sdk: gradio
7
- sdk_version: 5.33.1
8
- app_file: app.py
9
- pinned: false
10
- short_description: 'Consistent character images '
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
1
+ # Timtical Comic Creator
2
+
3
+ An AI-powered comic-style image generator built using Stable Diffusion and Gradio. Type in a prompt, and watch your imagination come to life!
4
+
5
+ ## Features
6
+ - Prompt-to-image generation
7
+ - Based on `stabilityai/stable-diffusion-2-1`
8
+ - Free and public Hugging Face Space
9
+
10
+ ## Example Prompts
11
+ - "A futuristic ninja in a neon-lit alley"
12
+ - "A warrior elf with silver armor and blue flames"
13
+ - "A space pirate with a robotic arm and a cosmic background"
14
+
15
+ ## Licensing
16
+ Make sure your use of this app complies with the Stable Diffusion license for commercial applications.
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from diffusers import StableDiffusionPipeline
3
+ import torch
4
+
5
+ # Load the Stable Diffusion model
6
+ pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", torch_dtype=torch.float16)
7
+ pipe = pipe.to("cuda")
8
+
9
+ # Define the image generation function
10
+ def generate_comic_image(prompt):
11
+ image = pipe(prompt).images[0]
12
+ return image
13
+
14
+ # Launch the Gradio interface
15
+ gr.Interface(
16
+ fn=generate_comic_image,
17
+ inputs=gr.Textbox(label="Describe your comic scene or character", placeholder="e.g. A futuristic bounty hunter with glowing eyes"),
18
+ outputs=gr.Image(label="Generated Comic Image"),
19
+ title="Timtical Comic Creator",
20
+ description="Type a prompt to generate comic-style images using AI. Built with Stable Diffusion."
21
+ ).launch()