Spaces:
				
			
			
	
			
			
		Paused
		
	
	
	
			
			
	
	
	
	
		
		
		Paused
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -20,6 +20,8 @@ def query(prompt, model, is_negative=False, steps=20, cfg_scale=7, seed=None): | |
| 20 |  | 
| 21 | 
             
                if model == 'DALL-E 3 XL':
         | 
| 22 | 
             
                    API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
         | 
|  | |
|  | |
| 23 |  | 
| 24 | 
             
                payload = {
         | 
| 25 | 
             
                    "inputs": prompt,
         | 
| @@ -43,7 +45,7 @@ with gr.Blocks(css=css) as dalle: | |
| 43 | 
             
                    with gr.Row():
         | 
| 44 | 
             
                        with gr.Column(elem_id="prompt-container"):
         | 
| 45 | 
             
                            text_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")
         | 
| 46 | 
            -
                            model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=["DALL-E 3 XL"])
         | 
| 47 |  | 
| 48 |  | 
| 49 | 
             
                with gr.Tab("Расширенные настройки"):
         | 
|  | |
| 20 |  | 
| 21 | 
             
                if model == 'DALL-E 3 XL':
         | 
| 22 | 
             
                    API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
         | 
| 23 | 
            +
                if model == 'SDXL Turbo':
         | 
| 24 | 
            +
                    API_URL = "https://api-inference.huggingface.co/models/stabilityai/sdxl-turbo"
         | 
| 25 |  | 
| 26 | 
             
                payload = {
         | 
| 27 | 
             
                    "inputs": prompt,
         | 
|  | |
| 45 | 
             
                    with gr.Row():
         | 
| 46 | 
             
                        with gr.Column(elem_id="prompt-container"):
         | 
| 47 | 
             
                            text_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")
         | 
| 48 | 
            +
                            model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=["DALL-E 3 XL", "SDXL Turbo"])
         | 
| 49 |  | 
| 50 |  | 
| 51 | 
             
                with gr.Tab("Расширенные настройки"):
         | 
 
			

