Download app.py from eshalarch/earch: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/spaces/eshalarch/earch/resolve/main/app.py
- Command line
-
hf download hf://spaces/eshalarch/earch/app.py
-
curl -L -o app.py https://huggingface.co/spaces/eshalarch/earch/resolve/main/app.py
1.2 kB
| import gradio as gr | |
| from huggingface_hub import InferenceClient | |
| # Aa Hugging Face na superfast computer no upyog karshe (Ekdam FREE) | |
| client = InferenceClient("stabilityai/stable-diffusion-xl-base-1.0") | |
| def generate_plan(prompt): | |
| # Perfect floor plan mate sacha keywords auto-add thashe | |
| full_prompt = f"{prompt}, architectural blueprint, 2D floor plan, CAD layout, black and white line art, professional design, highly detailed" | |
| try: | |
| image = client.text_to_image(full_prompt) | |
| return image | |
| except Exception as e: | |
| return None | |
| # Tool nu Mast Design | |
| with gr.Blocks() as demo: | |
| gr.Markdown("# 🏢 AI Architect Plan Generator (SUPER FAST)") | |
| with gr.Row(): | |
| with gr.Column(): | |
| input_text = gr.Textbox( | |
| label="Lakho kevo naksho joiye chhe (English ma):", | |
| placeholder="e.g., 2BHK house floor plan, 1200 sq ft..." | |
| ) | |
| submit_btn = gr.Button("Generate Plan Fast 🚀", variant="primary") | |
| with gr.Column(): | |
| output_img = gr.Image(label="Tamaro AI Architect Plan:") | |
| submit_btn.click(fn=generate_plan, inputs=input_text, outputs=output_img) | |
| demo.launch() | |