Spaces:
Sleeping
Sleeping
Refactor app.py to remove unused code, improve code structure, and add prediction functionality
Browse files
app.py
CHANGED
@@ -7,17 +7,17 @@ tile_upscaler_url = "gokaygokay/TileUpscalerV2"
|
|
7 |
client_tile_upscaler = Client(tile_upscaler_url)
|
8 |
|
9 |
def gradio_process_image(image, resolution, num_inference_steps, strength, hdr, guidance_scale, controlnet_strength, scheduler_name):
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
# return result
|
22 |
return image
|
23 |
|
|
|
7 |
client_tile_upscaler = Client(tile_upscaler_url)
|
8 |
|
9 |
def gradio_process_image(image, resolution, num_inference_steps, strength, hdr, guidance_scale, controlnet_strength, scheduler_name):
|
10 |
+
result = client_tile_upscaler.predict(
|
11 |
+
param_0=handle_file(image),
|
12 |
+
param_1=resolution,
|
13 |
+
param_2=num_inference_steps,
|
14 |
+
param_3=strength,
|
15 |
+
param_4=hdr,
|
16 |
+
param_5=guidance_scale,
|
17 |
+
param_6=controlnet_strength,
|
18 |
+
param_7=scheduler_name,
|
19 |
+
api_name="/wrapper"
|
20 |
+
)
|
21 |
# return result
|
22 |
return image
|
23 |
|