Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,9 @@ from themes import IndonesiaTheme # Import custom IndonesiaTheme
|
|
12 |
from lorify import Lorify
|
13 |
from css import css2
|
14 |
MAX_SEED = np.iinfo(np.int32).max
|
15 |
-
|
16 |
-
|
|
|
17 |
|
18 |
HF_TOKEN = os.getenv('HF_TOKEN_UPSCALER')
|
19 |
HF_TOKEN_UPSCALER = os.getenv('HF_TOKEN_UPSCALER')
|
@@ -50,7 +51,7 @@ async def generate_image(prompt, model, lora_word, width, height, scales, steps,
|
|
50 |
def get_upscale_finegrain(prompt, img_path, upscale_factor):
|
51 |
try:
|
52 |
print(f"[-] Memulai proses upscaling dengan faktor {upscale_factor} untuk gambar {img_path}")
|
53 |
-
client = Client("finegrain/finegrain-image-enhancer", hf_token=
|
54 |
result = client.predict(
|
55 |
input_image=handle_file(img_path),
|
56 |
prompt=prompt,
|
|
|
12 |
from lorify import Lorify
|
13 |
from css import css2
|
14 |
MAX_SEED = np.iinfo(np.int32).max
|
15 |
+
|
16 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
17 |
+
|
18 |
|
19 |
HF_TOKEN = os.getenv('HF_TOKEN_UPSCALER')
|
20 |
HF_TOKEN_UPSCALER = os.getenv('HF_TOKEN_UPSCALER')
|
|
|
51 |
def get_upscale_finegrain(prompt, img_path, upscale_factor):
|
52 |
try:
|
53 |
print(f"[-] Memulai proses upscaling dengan faktor {upscale_factor} untuk gambar {img_path}")
|
54 |
+
client = Client("finegrain/finegrain-image-enhancer", hf_token=HF_TOKEN)
|
55 |
result = client.predict(
|
56 |
input_image=handle_file(img_path),
|
57 |
prompt=prompt,
|