Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,13 @@
|
|
5 |
# --------------------------------------------------------
|
6 |
# gradio demo executable
|
7 |
# --------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
import os
|
9 |
import torch
|
10 |
import tempfile
|
@@ -24,6 +31,10 @@ if __name__ == '__main__':
|
|
24 |
parser = get_args_parser()
|
25 |
args = parser.parse_args()
|
26 |
|
|
|
|
|
|
|
|
|
27 |
if args.server_name is not None:
|
28 |
server_name = args.server_name
|
29 |
else:
|
|
|
5 |
# --------------------------------------------------------
|
6 |
# gradio demo executable
|
7 |
# --------------------------------------------------------
|
8 |
+
#!/usr/bin/env python3
|
9 |
+
# Copyright (C) 2024-present Naver Corporation. All rights reserved.
|
10 |
+
# Licensed under CC BY-NC-SA 4.0 (non-commercial use only).
|
11 |
+
#
|
12 |
+
# --------------------------------------------------------
|
13 |
+
# gradio demo executable
|
14 |
+
# --------------------------------------------------------
|
15 |
import os
|
16 |
import torch
|
17 |
import tempfile
|
|
|
31 |
parser = get_args_parser()
|
32 |
args = parser.parse_args()
|
33 |
|
34 |
+
# Set default values for required arguments
|
35 |
+
if args.weights is None and args.model_name is None:
|
36 |
+
args.model_name = 'MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric' # Provide a default model_name or set weights
|
37 |
+
|
38 |
if args.server_name is not None:
|
39 |
server_name = args.server_name
|
40 |
else:
|