Spaces:
Runtime error
Runtime error
Download app.py from developervai2027/gork_image: direct link, hf CLI and curl.
- Browser
- Download file 669 Bytes
-
https://huggingface.co/spaces/developervai2027/gork_image/resolve/main/app.py
- Command line
-
hf download hf://spaces/developervai2027/gork_image/app.py
-
curl -L -o app.py https://huggingface.co/spaces/developervai2027/gork_image/resolve/main/app.py
669 Bytes
| import gradio as gr | |
| from diffusers import StableDiffusionPipeline | |
| import torch | |
| print("🔄 Loading model...") | |
| pipe = StableDiffusionPipeline.from_pretrained( | |
| "nota-ai/bk-sdm-small", # ছোট মডেল (দ্রুত লোড হবে) | |
| torch_dtype=torch.float32, | |
| safety_checker=None | |
| ) | |
| def generate(prompt): | |
| image = pipe(prompt).images[0] | |
| return image | |
| with gr.Blocks(title="GORK PIC STUDIO") as demo: | |
| gr.Markdown("# 🎨 GORK PIC STUDIO") | |
| prompt = gr.Textbox(label="Enter your prompt", lines=2) | |
| output = gr.Image(label="Generated Image") | |
| btn = gr.Button("Generate") | |
| btn.click(generate, prompt, output) | |
| demo.launch() |