Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			Zero
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			Zero
	final details
Browse files- .gitignore +1 -0
- README.md +2 -2
- app.py +16 -14
    	
        .gitignore
    CHANGED
    
    | @@ -1,2 +1,3 @@ | |
| 1 | 
             
            __pycache__
         | 
| 2 | 
             
            venv
         | 
|  | 
|  | |
| 1 | 
             
            __pycache__
         | 
| 2 | 
             
            venv
         | 
| 3 | 
            +
            gradio_cached_examples/
         | 
    	
        README.md
    CHANGED
    
    | @@ -1,8 +1,8 @@ | |
| 1 | 
             
            ---
         | 
| 2 | 
             
            title: AI QR Code Generator
         | 
| 3 | 
             
            emoji: π±π²
         | 
| 4 | 
            -
            colorFrom:  | 
| 5 | 
            -
            colorTo:  | 
| 6 | 
             
            sdk: gradio
         | 
| 7 | 
             
            sdk_version: 3.35.2
         | 
| 8 | 
             
            app_file: app.py
         | 
|  | |
| 1 | 
             
            ---
         | 
| 2 | 
             
            title: AI QR Code Generator
         | 
| 3 | 
             
            emoji: π±π²
         | 
| 4 | 
            +
            colorFrom: MediumSeaGreen
         | 
| 5 | 
            +
            colorTo: CornflowerBlue
         | 
| 6 | 
             
            sdk: gradio
         | 
| 7 | 
             
            sdk_version: 3.35.2
         | 
| 8 | 
             
            app_file: app.py
         | 
    	
        app.py
    CHANGED
    
    | @@ -157,17 +157,18 @@ model: https://huggingface.co/DionTimmer/controlnet_qrcode-control_v1p_sd15 | |
| 157 | 
             
                            label="Negative Prompt",
         | 
| 158 | 
             
                            value="ugly, disfigured, low quality, blurry, nsfw",
         | 
| 159 | 
             
                        )
         | 
| 160 | 
            -
                         | 
|  | |
| 161 |  | 
| 162 | 
            -
             | 
| 163 | 
            -
             | 
| 164 | 
            -
             | 
| 165 | 
            -
                        )
         | 
| 166 | 
            -
             | 
| 167 | 
            -
                        with gr.Accordion(label="Params"):
         | 
| 168 | 
            -
                            gr.Markdown(
         | 
| 169 | 
            -
                                "**Note: The QR Code Image functionality is highly dependent on the params below.**"
         | 
| 170 | 
             
                            )
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
| 171 | 
             
                            guidance_scale = gr.Slider(
         | 
| 172 | 
             
                                minimum=0.0,
         | 
| 173 | 
             
                                maximum=50.0,
         | 
| @@ -193,7 +194,8 @@ model: https://huggingface.co/DionTimmer/controlnet_qrcode-control_v1p_sd15 | |
| 193 | 
             
                                label="Seed",
         | 
| 194 | 
             
                                randomize=True,
         | 
| 195 | 
             
                            )
         | 
| 196 | 
            -
                         | 
|  | |
| 197 | 
             
                    with gr.Column():
         | 
| 198 | 
             
                        result_image = gr.Image(label="Result Image")
         | 
| 199 | 
             
                run_btn.click(
         | 
| @@ -242,10 +244,10 @@ model: https://huggingface.co/DionTimmer/controlnet_qrcode-control_v1p_sd15 | |
| 242 | 
             
                            "https://huggingface.co/spaces/huggingface-projects/AI-QR-code-generator",
         | 
| 243 | 
             
                            "beautiful sunset in San Francisco with Golden Gate bridge in the background",
         | 
| 244 | 
             
                            "ugly, disfigured, low quality, blurry, nsfw",
         | 
| 245 | 
            -
                             | 
| 246 | 
             
                            2.7,
         | 
| 247 | 
            -
                            0. | 
| 248 | 
            -
                             | 
| 249 | 
             
                        ],
         | 
| 250 | 
             
                        [
         | 
| 251 | 
             
                            None,
         | 
| @@ -256,7 +258,7 @@ model: https://huggingface.co/DionTimmer/controlnet_qrcode-control_v1p_sd15 | |
| 256 | 
             
                            10.0,
         | 
| 257 | 
             
                            2.7,
         | 
| 258 | 
             
                            0.8,
         | 
| 259 | 
            -
                             | 
| 260 | 
             
                        ],
         | 
| 261 | 
             
                    ],
         | 
| 262 | 
             
                    fn=inference,
         | 
|  | |
| 157 | 
             
                            label="Negative Prompt",
         | 
| 158 | 
             
                            value="ugly, disfigured, low quality, blurry, nsfw",
         | 
| 159 | 
             
                        )
         | 
| 160 | 
            +
                        with gr.Accordion(label="Init Images (Optional)", open=False):
         | 
| 161 | 
            +
                            init_image = gr.Image(label="Init Image (Optional)", type="pil")
         | 
| 162 |  | 
| 163 | 
            +
                            qr_code_image = gr.Image(
         | 
| 164 | 
            +
                                label="QR Code Image (Optional)",
         | 
| 165 | 
            +
                                type="pil",
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
| 166 | 
             
                            )
         | 
| 167 | 
            +
             | 
| 168 | 
            +
                        with gr.Accordion(
         | 
| 169 | 
            +
                            label="Params: The generated QR Code functionality is largely influenced by the parameters detailed below",
         | 
| 170 | 
            +
                            open=False,
         | 
| 171 | 
            +
                        ):
         | 
| 172 | 
             
                            guidance_scale = gr.Slider(
         | 
| 173 | 
             
                                minimum=0.0,
         | 
| 174 | 
             
                                maximum=50.0,
         | 
|  | |
| 194 | 
             
                                label="Seed",
         | 
| 195 | 
             
                                randomize=True,
         | 
| 196 | 
             
                            )
         | 
| 197 | 
            +
                        with gr.Row():
         | 
| 198 | 
            +
                            run_btn = gr.Button("Run")
         | 
| 199 | 
             
                    with gr.Column():
         | 
| 200 | 
             
                        result_image = gr.Image(label="Result Image")
         | 
| 201 | 
             
                run_btn.click(
         | 
|  | |
| 244 | 
             
                            "https://huggingface.co/spaces/huggingface-projects/AI-QR-code-generator",
         | 
| 245 | 
             
                            "beautiful sunset in San Francisco with Golden Gate bridge in the background",
         | 
| 246 | 
             
                            "ugly, disfigured, low quality, blurry, nsfw",
         | 
| 247 | 
            +
                            14.7,
         | 
| 248 | 
             
                            2.7,
         | 
| 249 | 
            +
                            0.75,
         | 
| 250 | 
            +
                            1423585430,
         | 
| 251 | 
             
                        ],
         | 
| 252 | 
             
                        [
         | 
| 253 | 
             
                            None,
         | 
|  | |
| 258 | 
             
                            10.0,
         | 
| 259 | 
             
                            2.7,
         | 
| 260 | 
             
                            0.8,
         | 
| 261 | 
            +
                            2702246671,
         | 
| 262 | 
             
                        ],
         | 
| 263 | 
             
                    ],
         | 
| 264 | 
             
                    fn=inference,
         | 

