Spaces:
Running
on
Zero
Running
on
Zero
minor
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from typing import Optional
|
2 |
-
|
3 |
|
4 |
import gradio as gr
|
5 |
import numpy as np
|
@@ -40,7 +40,7 @@ OmniParser is a screen parsing tool to convert general GUI screen to structured
|
|
40 |
|
41 |
# DEVICE = torch.device('cuda')
|
42 |
|
43 |
-
|
44 |
@torch.inference_mode()
|
45 |
# @torch.autocast(device_type="cuda", dtype=torch.bfloat16)
|
46 |
# @spaces.GPU(duration=65)
|
@@ -103,5 +103,5 @@ with gr.Blocks() as demo:
|
|
103 |
)
|
104 |
|
105 |
# demo.launch(debug=False, show_error=True, share=True)
|
106 |
-
demo.launch(share=True, server_port=7861, server_name='0.0.0.0')
|
107 |
-
|
|
|
1 |
from typing import Optional
|
2 |
+
import spaces
|
3 |
|
4 |
import gradio as gr
|
5 |
import numpy as np
|
|
|
40 |
|
41 |
# DEVICE = torch.device('cuda')
|
42 |
|
43 |
+
@spaces.GPU
|
44 |
@torch.inference_mode()
|
45 |
# @torch.autocast(device_type="cuda", dtype=torch.bfloat16)
|
46 |
# @spaces.GPU(duration=65)
|
|
|
103 |
)
|
104 |
|
105 |
# demo.launch(debug=False, show_error=True, share=True)
|
106 |
+
# demo.launch(share=True, server_port=7861, server_name='0.0.0.0')
|
107 |
+
demo.queue().launch(share=False)
|