Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
71c9c42
1
Parent(s):
3ffc33c
debugging app.py
Browse files
app.py
CHANGED
|
@@ -143,7 +143,9 @@ header = """
|
|
| 143 |
"""
|
| 144 |
|
| 145 |
|
| 146 |
-
def create_app(
|
|
|
|
|
|
|
| 147 |
|
| 148 |
with gr.Blocks() as app:
|
| 149 |
gr.Markdown(header, elem_id="header")
|
|
@@ -176,7 +178,7 @@ def create_app():
|
|
| 176 |
|
| 177 |
submit_btn.click(
|
| 178 |
fn=process_image_and_text,
|
| 179 |
-
inputs=[original_image, scale, seed, text
|
| 180 |
outputs=output_image,
|
| 181 |
)
|
| 182 |
|
|
@@ -184,4 +186,5 @@ def create_app():
|
|
| 184 |
|
| 185 |
|
| 186 |
if __name__ == "__main__":
|
| 187 |
-
create_app(
|
|
|
|
|
|
| 143 |
"""
|
| 144 |
|
| 145 |
|
| 146 |
+
def create_app(
|
| 147 |
+
device: str = "cuda",
|
| 148 |
+
):
|
| 149 |
|
| 150 |
with gr.Blocks() as app:
|
| 151 |
gr.Markdown(header, elem_id="header")
|
|
|
|
| 178 |
|
| 179 |
submit_btn.click(
|
| 180 |
fn=process_image_and_text,
|
| 181 |
+
inputs=[original_image, scale, seed, text],
|
| 182 |
outputs=output_image,
|
| 183 |
)
|
| 184 |
|
|
|
|
| 186 |
|
| 187 |
|
| 188 |
if __name__ == "__main__":
|
| 189 |
+
demo = create_app(device="cuda")
|
| 190 |
+
demo.launch(debug=True, ssr_mode=False)
|