Update app.py
Browse files
app.py
CHANGED
|
@@ -25,13 +25,6 @@ def query(prompt, is_negative=False, steps=35, cfg_scale=7, sampler="DPM++ 2M Ka
|
|
| 25 |
API_TOKEN = random.choice([os.getenv("HF_READ_TOKEN")])
|
| 26 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
| 27 |
|
| 28 |
-
# Translate the prompt from Russian to English if necessary
|
| 29 |
-
prompt = GoogleTranslator(source='ru', target='en').translate(prompt)
|
| 30 |
-
print(f'\033[1mGeneration {key} translation:\033[0m {prompt}')
|
| 31 |
-
|
| 32 |
-
# Add some extra flair to the prompt
|
| 33 |
-
prompt = f"{prompt} | ultra detail, ultra elaboration, ultra quality, perfect."
|
| 34 |
-
print(f'\033[1mGeneration {key}:\033[0m {prompt}')
|
| 35 |
|
| 36 |
# Prepare the payload for the API call, including width and height
|
| 37 |
payload = {
|
|
|
|
| 25 |
API_TOKEN = random.choice([os.getenv("HF_READ_TOKEN")])
|
| 26 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
# Prepare the payload for the API call, including width and height
|
| 30 |
payload = {
|