Spaces:
Runtime error
Runtime error
Allocation per seconds
Browse files
app.py
CHANGED
|
@@ -96,7 +96,7 @@ def reset():
|
|
| 96 |
0.,
|
| 97 |
"v0-Q",
|
| 98 |
"input",
|
| 99 |
-
|
| 100 |
]
|
| 101 |
|
| 102 |
def check_and_update(input_image):
|
|
@@ -307,7 +307,7 @@ def get_duration(
|
|
| 307 |
output_format,
|
| 308 |
allocation
|
| 309 |
):
|
| 310 |
-
return
|
| 311 |
|
| 312 |
@spaces.GPU(duration=get_duration)
|
| 313 |
def restore_on_gpu(
|
|
@@ -500,7 +500,7 @@ with gr.Blocks() as interface:
|
|
| 500 |
prompt_hint = gr.HTML("You can use a <a href='"'https://huggingface.co/spaces/badayvedat/LLaVA'"'>LlaVa space</a> to auto-generate the description of your image.")
|
| 501 |
upscale = gr.Radio([["x1", 1], ["x2", 2], ["x3", 3], ["x4", 4], ["x5", 5], ["x6", 6], ["x7", 7], ["x8", 8], ["x9", 9], ["x10", 10]], label="Upscale factor", info="Resolution x1 to x10", value=2, interactive=True)
|
| 502 |
output_format = gr.Radio([["As input", "input"], ["*.png", "png"], ["*.webp", "webp"], ["*.jpeg", "jpeg"], ["*.gif", "gif"], ["*.bmp", "bmp"]], label="Image format for result", info="File extention", value="input", interactive=True)
|
| 503 |
-
allocation = gr.
|
| 504 |
|
| 505 |
with gr.Accordion("Pre-denoising (optional)", open=False):
|
| 506 |
gamma_correction = gr.Slider(label="Gamma Correction", info = "lower=lighter, higher=darker", minimum=0.1, maximum=2.0, value=1.0, step=0.1)
|
|
@@ -602,7 +602,7 @@ with gr.Blocks() as interface:
|
|
| 602 |
0.,
|
| 603 |
"v0-Q",
|
| 604 |
"input",
|
| 605 |
-
|
| 606 |
],
|
| 607 |
[
|
| 608 |
"./Examples/Example2.jpeg",
|
|
@@ -633,7 +633,7 @@ with gr.Blocks() as interface:
|
|
| 633 |
0.,
|
| 634 |
"v0-Q",
|
| 635 |
"input",
|
| 636 |
-
|
| 637 |
],
|
| 638 |
[
|
| 639 |
"./Examples/Example3.webp",
|
|
@@ -664,7 +664,7 @@ with gr.Blocks() as interface:
|
|
| 664 |
0.,
|
| 665 |
"v0-Q",
|
| 666 |
"input",
|
| 667 |
-
|
| 668 |
],
|
| 669 |
[
|
| 670 |
"./Examples/Example3.webp",
|
|
@@ -695,7 +695,7 @@ with gr.Blocks() as interface:
|
|
| 695 |
0.,
|
| 696 |
"v0-Q",
|
| 697 |
"input",
|
| 698 |
-
|
| 699 |
],
|
| 700 |
],
|
| 701 |
run_on_click = True,
|
|
|
|
| 96 |
0.,
|
| 97 |
"v0-Q",
|
| 98 |
"input",
|
| 99 |
+
179
|
| 100 |
]
|
| 101 |
|
| 102 |
def check_and_update(input_image):
|
|
|
|
| 307 |
output_format,
|
| 308 |
allocation
|
| 309 |
):
|
| 310 |
+
return allocation
|
| 311 |
|
| 312 |
@spaces.GPU(duration=get_duration)
|
| 313 |
def restore_on_gpu(
|
|
|
|
| 500 |
prompt_hint = gr.HTML("You can use a <a href='"'https://huggingface.co/spaces/badayvedat/LLaVA'"'>LlaVa space</a> to auto-generate the description of your image.")
|
| 501 |
upscale = gr.Radio([["x1", 1], ["x2", 2], ["x3", 3], ["x4", 4], ["x5", 5], ["x6", 6], ["x7", 7], ["x8", 8], ["x9", 9], ["x10", 10]], label="Upscale factor", info="Resolution x1 to x10", value=2, interactive=True)
|
| 502 |
output_format = gr.Radio([["As input", "input"], ["*.png", "png"], ["*.webp", "webp"], ["*.jpeg", "jpeg"], ["*.gif", "gif"], ["*.bmp", "bmp"]], label="Image format for result", info="File extention", value="input", interactive=True)
|
| 503 |
+
allocation = gr.Slider(label="GPU allocation time (in seconds)", info="lower=May abort run, higher=Quota penalty for next runs", value=179, minimum=59, maximum=320, step=1)
|
| 504 |
|
| 505 |
with gr.Accordion("Pre-denoising (optional)", open=False):
|
| 506 |
gamma_correction = gr.Slider(label="Gamma Correction", info = "lower=lighter, higher=darker", minimum=0.1, maximum=2.0, value=1.0, step=0.1)
|
|
|
|
| 602 |
0.,
|
| 603 |
"v0-Q",
|
| 604 |
"input",
|
| 605 |
+
179
|
| 606 |
],
|
| 607 |
[
|
| 608 |
"./Examples/Example2.jpeg",
|
|
|
|
| 633 |
0.,
|
| 634 |
"v0-Q",
|
| 635 |
"input",
|
| 636 |
+
179
|
| 637 |
],
|
| 638 |
[
|
| 639 |
"./Examples/Example3.webp",
|
|
|
|
| 664 |
0.,
|
| 665 |
"v0-Q",
|
| 666 |
"input",
|
| 667 |
+
179
|
| 668 |
],
|
| 669 |
[
|
| 670 |
"./Examples/Example3.webp",
|
|
|
|
| 695 |
0.,
|
| 696 |
"v0-Q",
|
| 697 |
"input",
|
| 698 |
+
179
|
| 699 |
],
|
| 700 |
],
|
| 701 |
run_on_click = True,
|