Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -454,9 +454,10 @@ def main():
|
|
| 454 |
vae=vae,
|
| 455 |
model=model
|
| 456 |
)
|
| 457 |
-
|
| 458 |
-
thread
|
| 459 |
-
|
|
|
|
| 460 |
|
| 461 |
with gr.Blocks() as demo:
|
| 462 |
with gr.Row():
|
|
@@ -589,7 +590,7 @@ def main():
|
|
| 589 |
q.put(args)
|
| 590 |
result = response_queue.get()
|
| 591 |
if isinstance(result, ModelFailure):
|
| 592 |
-
raise RuntimeError
|
| 593 |
return result
|
| 594 |
|
| 595 |
submit_btn.click(
|
|
|
|
| 454 |
vae=vae,
|
| 455 |
model=model
|
| 456 |
)
|
| 457 |
+
model_main(**generation_kwargs)
|
| 458 |
+
# thread = Thread(target=model_main, kwargs=generation_kwargs)
|
| 459 |
+
# thread.start()
|
| 460 |
+
# processes.append(thread)
|
| 461 |
|
| 462 |
with gr.Blocks() as demo:
|
| 463 |
with gr.Row():
|
|
|
|
| 590 |
q.put(args)
|
| 591 |
result = response_queue.get()
|
| 592 |
if isinstance(result, ModelFailure):
|
| 593 |
+
raise RuntimeError("Model failed to generate the image.")
|
| 594 |
return result
|
| 595 |
|
| 596 |
submit_btn.click(
|