Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import json
|
|
10 |
|
11 |
# Project by Nymbo
|
12 |
|
13 |
-
API_URL = "https://api-inference.huggingface.co/models/
|
14 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
15 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
16 |
timeout = 100
|
@@ -26,7 +26,7 @@ def query(prompt, is_negative=False, steps=35, cfg_scale=7, sampler="DPM++ 2M Ka
|
|
26 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
27 |
|
28 |
# Translate the prompt from Russian to English if necessary
|
29 |
-
prompt = GoogleTranslator(source='
|
30 |
print(f'\033[1mGeneration {key} translation:\033[0m {prompt}')
|
31 |
|
32 |
# Add some extra flair to the prompt
|
@@ -91,7 +91,7 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', css=css) as app:
|
|
91 |
# Accordion for advanced settings
|
92 |
with gr.Row():
|
93 |
with gr.Accordion("Advanced Settings", open=False):
|
94 |
-
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="What should not be in the image", value="(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, misspellings, typos", lines=3, elem_id="negative-prompt-text-input")
|
95 |
with gr.Row():
|
96 |
width = gr.Slider(label="Width", value=1024, minimum=64, maximum=1216, step=32)
|
97 |
height = gr.Slider(label="Height", value=1024, minimum=64, maximum=1216, step=32)
|
|
|
10 |
|
11 |
# Project by Nymbo
|
12 |
|
13 |
+
API_URL = "https://api-inference.huggingface.co/models/shweaung/tazaungdaing"
|
14 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
15 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
16 |
timeout = 100
|
|
|
26 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
27 |
|
28 |
# Translate the prompt from Russian to English if necessary
|
29 |
+
prompt = GoogleTranslator(source='my', target='en').translate(prompt)
|
30 |
print(f'\033[1mGeneration {key} translation:\033[0m {prompt}')
|
31 |
|
32 |
# Add some extra flair to the prompt
|
|
|
91 |
# Accordion for advanced settings
|
92 |
with gr.Row():
|
93 |
with gr.Accordion("Advanced Settings", open=False):
|
94 |
+
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="What should not be in the image", value="(text,deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, misspellings, typos", lines=3, elem_id="negative-prompt-text-input")
|
95 |
with gr.Row():
|
96 |
width = gr.Slider(label="Width", value=1024, minimum=64, maximum=1216, step=32)
|
97 |
height = gr.Slider(label="Height", value=1024, minimum=64, maximum=1216, step=32)
|