Spaces:
Running
Running
Update app.py
Browse files10 unmodified lines111213141516171819202142 unmodified lines64656667686922 unmodified lines92939495969710 unmodified linesAPI_TOKEN = os.getenv("HF_READ_TOKEN")headers = {"Authorization": f"Bearer {API_TOKEN}"}timeout = 100models_list = ["AbsoluteReality 1.8.1", "DALL-E 3 XL", "Playground 2", "Openjourney 4", "Lyriel 1.6", "Animagine XL 2.0", "Counterfeit 2.5", "Realistic Vision 5.1", "Incursios 1.6", "Anime Detailer XL", "Vector Art XL", "epiCRealism", "PixelArt XL", "NewReality XL", "Anything 5.0", "Disney", "CleanLinearMix"]# PLEASE ❤ like ❤ this space. Please like me. I am 12 years old, one of my projects is: https://ai-hub.rf.gd . I live in Russia, I don't know English very well. Therefore, I apologize that there is only Russian here, but I think it will not be difficult to translate all this. (For example, using gpt)def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1):if prompt == "" or prompt == None:return None42 unmodified linesAPI_URL = "https://api-inference.huggingface.co/models/goofyai/disney_style_xl"if model == 'CleanLinearMix':API_URL = "https://api-inference.huggingface.co/models/digiplay/CleanLinearMix_nsfw"payload = {"inputs": prompt,22 unmodified linestext_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")with gr.Row():model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=models_list)with gr.Tab("Расширенные настройки"):10 unmodified lines111213141516171819202142 unmodified lines646566676869707122 unmodified lines94959697989910010110210 unmodified linesAPI_TOKEN = os.getenv("HF_READ_TOKEN")headers = {"Authorization": f"Bearer {API_TOKEN}"}timeout = 100models_list = ["AbsoluteReality 1.8.1", "DALL-E 3 XL", "Playground 2", "Openjourney 4", "Lyriel 1.6", "Animagine XL 2.0", "Counterfeit 2.5", "Realistic Vision 5.1", "Incursios 1.6", "Anime Detailer XL", "Vector Art XL", "epiCRealism", "PixelArt XL", "NewReality XL", "Anything 5.0", "Disney", "CleanLinearMix", "Custom"]# PLEASE ❤ like ❤ this space. Please like me. I am 12 years old, one of my projects is: https://ai-hub.rf.gd . I live in Russia, I don't know English very well. Therefore, I apologize that there is only Russian here, but I think it will not be difficult to translate all this. (For example, using gpt)def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM++ 2M Karras", seed=-1, custom=None):if prompt == "" or prompt == None:return None42 unmodified linesAPI_URL = "https://api-inference.huggingface.co/models/goofyai/disney_style_xl"if model == 'CleanLinearMix':API_URL = "https://api-inference.huggingface.co/models/digiplay/CleanLinearMix_nsfw"if model == 'custom':API_URL == f"https://api-inference.huggingface.co/models/{custom}"payload = {"inputs": prompt,22 unmodified linestext_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")with gr.Row():model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=models_list)with gr.Accordion(label="Custom", open=False):custom = gr.Textbox(show_label=False, placeholder="autor/model — openskyml/dalle-3-xl")with gr.Tab("Расширенные настройки"):
app.py+7-2