Spaces:
Sleeping
Sleeping
Zai
commited on
Commit
·
6256a52
1
Parent(s):
e1b4409
starting unet
Browse files- yume/__main__.py +28 -0
yume/__main__.py
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import argparse
|
2 |
+
# from .yume import Yume
|
3 |
+
|
4 |
+
def main():
|
5 |
+
parser = argparse.ArgumentParser(description='Yume CLI')
|
6 |
+
subparsers = parser.add_subparsers(dest='command')
|
7 |
+
|
8 |
+
download_parser = subparsers.add_parser('download', help='Download the model')
|
9 |
+
download_parser.add_argument('--model_name', type=str, required=True, help='Name of the model to download')
|
10 |
+
|
11 |
+
query_parser = subparsers.add_parser('query', help='Run a query on the model')
|
12 |
+
query_parser.add_argument('query_text', type=str, help='Text to query the model with')
|
13 |
+
|
14 |
+
args = parser.parse_args()
|
15 |
+
|
16 |
+
if args.command == 'download':
|
17 |
+
# yume = Yume()
|
18 |
+
# yume.download_model(args.model_name)
|
19 |
+
result = args.model_name
|
20 |
+
print(result)
|
21 |
+
elif args.command == 'query':
|
22 |
+
# yume = Yume()
|
23 |
+
# result = yume.query(args.query_text)
|
24 |
+
result = args.query_text
|
25 |
+
print(result)
|
26 |
+
|
27 |
+
if __name__ == "__main__":
|
28 |
+
main()
|