Spaces:
Runtime error
Runtime error
Update injection_main.py
Browse files- injection_main.py +4 -1
injection_main.py
CHANGED
|
@@ -622,7 +622,9 @@ if __name__ == "__main__":
|
|
| 622 |
elif mode == "app":
|
| 623 |
# gradio
|
| 624 |
import gradio as gr
|
|
|
|
| 625 |
|
|
|
|
| 626 |
def style_transfer_app(
|
| 627 |
prompt,
|
| 628 |
image,
|
|
@@ -741,5 +743,6 @@ if __name__ == "__main__":
|
|
| 741 |
outputs=["image"],
|
| 742 |
title="Artist Interactive Demo",
|
| 743 |
examples=examples,
|
|
|
|
| 744 |
)
|
| 745 |
-
app.launch()
|
|
|
|
| 622 |
elif mode == "app":
|
| 623 |
# gradio
|
| 624 |
import gradio as gr
|
| 625 |
+
import spaces
|
| 626 |
|
| 627 |
+
@spaces.GPU()
|
| 628 |
def style_transfer_app(
|
| 629 |
prompt,
|
| 630 |
image,
|
|
|
|
| 743 |
outputs=["image"],
|
| 744 |
title="Artist Interactive Demo",
|
| 745 |
examples=examples,
|
| 746 |
+
cache_examples=False
|
| 747 |
)
|
| 748 |
+
app.launch(show_api=False, show_error=True)
|