Spaces:
Running
on
Zero
Running
on
Zero
update: gpu support
Browse files- app.py +8 -1
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
import argparse
|
| 2 |
from pathlib import Path
|
|
|
|
| 3 |
from imcui.ui.app_class import ImageMatchingApp
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
| 6 |
parser = argparse.ArgumentParser()
|
| 7 |
parser.add_argument(
|
| 8 |
"--server_name",
|
|
@@ -29,3 +32,7 @@ if __name__ == "__main__":
|
|
| 29 |
config=args.config,
|
| 30 |
example_data_root=Path("imcui/datasets"),
|
| 31 |
).run()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import argparse
|
| 2 |
from pathlib import Path
|
| 3 |
+
import spaces
|
| 4 |
from imcui.ui.app_class import ImageMatchingApp
|
| 5 |
|
| 6 |
+
|
| 7 |
+
@spaces.GPU
|
| 8 |
+
def launch_app():
|
| 9 |
parser = argparse.ArgumentParser()
|
| 10 |
parser.add_argument(
|
| 11 |
"--server_name",
|
|
|
|
| 32 |
config=args.config,
|
| 33 |
example_data_root=Path("imcui/datasets"),
|
| 34 |
).run()
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
if __name__ == "__main__":
|
| 38 |
+
launch_app()
|
requirements.txt
CHANGED
|
@@ -35,6 +35,7 @@ scikit-learn
|
|
| 35 |
scipy
|
| 36 |
seaborn
|
| 37 |
shapely
|
|
|
|
| 38 |
tensorboardX==2.6.1
|
| 39 |
torchmetrics==0.6.0
|
| 40 |
torchvision==0.19.0
|
|
|
|
| 35 |
scipy
|
| 36 |
seaborn
|
| 37 |
shapely
|
| 38 |
+
spaces
|
| 39 |
tensorboardX==2.6.1
|
| 40 |
torchmetrics==0.6.0
|
| 41 |
torchvision==0.19.0
|