Spaces:
Sleeping
Sleeping
Commit ·
78db239
1
Parent(s): 11d4c00
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
from scipy.ndimage import gaussian_filter
|
| 2 |
import gradio as gr
|
| 3 |
import torch
|
| 4 |
from model import Model, ModelType
|
|
@@ -18,4 +17,11 @@ parser = argparse.ArgumentParser()
|
|
| 18 |
parser.add_argument('--public_access', action='store_true',
|
| 19 |
help="if enabled, the app can be access from a public url", default=False)
|
| 20 |
args = parser.parse_args()
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
from model import Model, ModelType
|
|
|
|
| 17 |
parser.add_argument('--public_access', action='store_true',
|
| 18 |
help="if enabled, the app can be access from a public url", default=False)
|
| 19 |
args = parser.parse_args()
|
| 20 |
+
|
| 21 |
+
if on_huggingspace:
|
| 22 |
+
demo.queue(max_size=20)
|
| 23 |
+
demo.launch(debug=True)
|
| 24 |
+
else:
|
| 25 |
+
_, _, link = demo.queue(api_open=False).launch(
|
| 26 |
+
file_directories=['temporal'], share=args.public_access)
|
| 27 |
+
print(link)
|