Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,7 +88,7 @@ def encode_prompt(prompt_batch, text_encoder, tokenizer, proportion_empty_prompt
|
|
| 88 |
|
| 89 |
return prompt_embeds, prompt_masks
|
| 90 |
|
| 91 |
-
|
| 92 |
@torch.no_grad()
|
| 93 |
def model_main(args, master_port, rank, request_queue, response_queue, mp_barrier):
|
| 94 |
# import here to avoid huggingface Tokenizer parallelism warnings
|
|
@@ -551,7 +551,7 @@ def main():
|
|
| 551 |
label="Examples",
|
| 552 |
) # noqa
|
| 553 |
|
| 554 |
-
|
| 555 |
def on_submit(*args):
|
| 556 |
for q in request_queues:
|
| 557 |
q.put(args)
|
|
|
|
| 88 |
|
| 89 |
return prompt_embeds, prompt_masks
|
| 90 |
|
| 91 |
+
|
| 92 |
@torch.no_grad()
|
| 93 |
def model_main(args, master_port, rank, request_queue, response_queue, mp_barrier):
|
| 94 |
# import here to avoid huggingface Tokenizer parallelism warnings
|
|
|
|
| 551 |
label="Examples",
|
| 552 |
) # noqa
|
| 553 |
|
| 554 |
+
@spaces.GPU(duration=200)
|
| 555 |
def on_submit(*args):
|
| 556 |
for q in request_queues:
|
| 557 |
q.put(args)
|