52234c8
备份 yangsaisai 7 years ago
6 changed file(s) with 161 addition(s) and 119 deletion(s). Raw diff Collapse all Expand all
0
1 ## Intro
2
3 Provide a short overview of your algorithm that explains the value and primary use cases.
4
5 ## Usage
6
7 ```
8 def function_name(conf={})
9 ```
10
11 ## Example
12
13 Provide and explain examples of input and output for your algorithm.
14
15 `Code`
16
17 ```
18 please input your example code
19 ```
+0
-6
.ipynb_checkpoints/Untitled-checkpoint.ipynb less more
0 {
1 "cells": [],
2 "metadata": {},
3 "nbformat": 4,
4 "nbformat_minor": 2
5 }
22 import sys
33
44 # Import necessary packages
5 # from modules import json_parser
5 from modules import json_parser
66 from modules import json_parser
77 from modules import Client
8
9 # from write_poem import start_model
8 from write_poem import start_model
109
1110 # Initialise Client object
1211 client = Client(api_key='33799e1c5d6fa05fdd7dec3aa7aad868445d1c737edcf9c37fa89cb3b39cb2d9',
2120
2221 # Make controller alias for further use
2322 controller = client.controller
24
25 # writer = start_model()
23 writer = start_model()
2624
2725
2826 def handle(conf):
2927 # paste your code here
30 # path = os.getcwd() # 获取当前工作目录
31 # print(path)
32 # if conf['style'] == ['藏头诗']:
33 # poetry = writer.cangtou(conf['Chinese_word'])
34 # elif conf['style'] == ['藏字诗']:
35 # poetry = writer.hide_words(conf['Chinese_word'])
36 # else:
37 # poetry = writer.rhyme_verse()
38 # return {"Poetry": poetry}
39 return {"Poetry": 'asadd'}
28 if conf['style'] == ['藏头诗']:
29 poetry = writer.cangtou(conf['Chinese_word'])
30 elif conf['style'] == ['藏字诗']:
31 poetry = writer.hide_words(conf['Chinese_word'])
32 else:
33 poetry = writer.rhyme_verse()
34 return {"Poetry": poetry}
35 # return {"Poetry": 'asadd'}
4036
4137
4238 # if __name__ == '__main__':
+0
-67
Untitled.ipynb less more
0 {
1 "cells": [
2 {
3 "cell_type": "code",
4 "execution_count": 1,
5 "metadata": {},
6 "outputs": [],
7 "source": [
8 "# You can use other public modules via our Client object with module's identifier\n",
9 "# and parameters.\n",
10 "# For more detailes, please see our online document - https://momodel.github.io/docs/#\n",
11 "\n",
12 "import os\n",
13 "import sys\n",
14 "\n",
15 "# Define root path\n",
16 "sys.path.append('../')\n",
17 "\n",
18 "# Import necessary packages\n",
19 "from modules import json_parser\n",
20 "from modules import Client\n",
21 "\n",
22 "# Initialise Client object\n",
23 "client = Client(api_key='33799e1c5d6fa05fdd7dec3aa7aad868445d1c737edcf9c37fa89cb3b39cb2d9',\n",
24 " project_id='5bfd118f1afd942b66b36b30', user_ID='yangsaisai',\n",
25 " project_type='app', source_file_path='Untitled.ipynb')\n",
26 "\n",
27 "# Make run/train/predict command alias for further use\n",
28 "run = client.run\n",
29 "train = client.train\n",
30 "predict = client.predict\n",
31 "\n",
32 "# Make controller alias for further use\n",
33 "controller = client.controller\n",
34 "\n"
35 ]
36 },
37 {
38 "cell_type": "code",
39 "execution_count": null,
40 "metadata": {},
41 "outputs": [],
42 "source": []
43 }
44 ],
45 "metadata": {
46 "kernelspec": {
47 "display_name": "Python 3",
48 "language": "python",
49 "name": "python3"
50 },
51 "language_info": {
52 "codemirror_mode": {
53 "name": "ipython",
54 "version": 3
55 },
56 "file_extension": ".py",
57 "mimetype": "text/x-python",
58 "name": "python",
59 "nbconvert_exporter": "python",
60 "pygments_lexer": "ipython3",
61 "version": "3.5.2"
62 }
63 },
64 "nbformat": 4,
65 "nbformat_minor": 2
66 }
22 import sys
33
44 # Import necessary packages
5 # from modules import json_parser
5 from modules import json_parser
66 from modules import json_parser
77 from modules import Client
8
9 # from write_poem import start_model
8 from write_poem import start_model
109
1110 # Initialise Client object
1211 client = Client(api_key='33799e1c5d6fa05fdd7dec3aa7aad868445d1c737edcf9c37fa89cb3b39cb2d9',
2120
2221 # Make controller alias for further use
2322 controller = client.controller
24
25 # writer = start_model()
23 writer = start_model()
2624
2725
2826 def handle(conf):
2927 # paste your code here
30 # path = os.getcwd() # 获取当前工作目录
31 # print(path)
32 # if conf['style'] == ['藏头诗']:
33 # poetry = writer.cangtou(conf['Chinese_word'])
34 # elif conf['style'] == ['藏字诗']:
35 # poetry = writer.hide_words(conf['Chinese_word'])
36 # else:
37 # poetry = writer.rhyme_verse()
38 # return {"Poetry": poetry}
39 return {"Poetry": 'asadd'}
28 if conf['style'] == ['藏头诗']:
29 poetry = writer.cangtou(conf['Chinese_word'])
30 elif conf['style'] == ['藏字诗']:
31 poetry = writer.hide_words(conf['Chinese_word'])
32 else:
33 poetry = writer.rhyme_verse()
34 return {"Poetry": poetry}
35 # return {"Poetry": 'asadd'}
4036
4137
4238 # if __name__ == '__main__':
0 absl-py==0.6.1
1 alembic==1.0.3
2 astor==0.7.1
3 autopep8==1.4
4 backcall==0.1.0
5 bleach==3.0.2
6 certifi==2018.10.15
7 chardet==3.0.4
8 cloudpickle==0.6.1
9 cycler==0.10.0
10 Cython==0.29
11 dask==0.20.2
12 decorator==4.3.0
13 defusedxml==0.5.0
14 entrypoints==0.2.3
15 future==0.16.0
16 gast==0.2.0
17 grpcio==1.16.0
18 h5py==2.8.0
19 html5lib==1.0.1
20 idna==2.7
21 imageio==2.4.1
22 imgaug==0.2.6
23 ipykernel==5.1.0
24 ipython==7.1.1
25 ipython-genutils==0.2.0
26 ipywidgets==7.4.2
27 jedi==0.13.1
28 jieba==0.39
29 Jinja2==2.10
30 jsonschema==2.6.0
31 jupyter==1.0.0
32 jupyter-client==5.2.3
33 jupyter-console==6.0.0
34 jupyter-core==4.4.0
35 jupyterhub==0.8.1
36 jupyterlab==0.31.1
37 jupyterlab-launcher==0.10.5
38 Keras==2.2.4
39 Keras-Applications==1.0.6
40 Keras-Preprocessing==1.0.5
41 kiwisolver==1.0.1
42 Mako==1.0.7
43 Markdown==3.0.1
44 MarkupSafe==1.0
45 matplotlib==3.0.2
46 mccabe==0.6.1
47 mistune==0.8.4
48 nbconvert==5.4.0
49 nbformat==4.4.0
50 networkx==2.2
51 nltk==3.3
52 notebook==5.7.0
53 numpy==1.15.2
54 opencv-python==3.4.3.18
55 pamela==0.3.0
56 pandas==0.23.4
57 pandocfilters==1.4.2
58 parso==0.3.1
59 pbr==5.1.1
60 pexpect==4.6.0
61 pickleshare==0.7.5
62 Pillow==5.3.0
63 pluggy==0.7.1
64 prometheus-client==0.4.2
65 prompt-toolkit==2.0.7
66 protobuf==3.6.1
67 ptyprocess==0.6.0
68 pycodestyle==2.4.0
69 pycurl==7.43.0
70 pydocstyle==2.1.1
71 pydot==1.2.4
72 pyflakes==2.0.0
73 Pygments==2.2.0
74 pygobject==3.20.0
75 pyparsing==2.3.0
76 python-apt==1.1.0b1+ubuntu0.16.4.2
77 python-dateutil==2.7.3
78 python-editor==1.0.3
79 python-jsonrpc-server==0.0.1
80 python-language-server==0.21.2
81 python-oauth2==1.1.0
82 pytz==2018.5
83 PyWavelets==1.0.1
84 PyYAML==3.13
85 pyzmq==17.1.2
86 qtconsole==4.4.2
87 requests==2.20.0
88 rope==0.11.0
89 scikit-image==0.14.1
90 scikit-learn==0.20.0
91 scipy==1.1.0
92 seaborn==0.9.0
93 Send2Trash==1.5.0
94 Shapely==1.6.4.post2
95 simplegeneric==0.8.1
96 six==1.11.0
97 sklearn==0.0
98 snowballstemmer==1.2.1
99 SQLAlchemy==1.2.14
100 stevedore==1.29.0
101 tensorboard==1.11.0
102 tensorflow==1.12.0
103 termcolor==1.1.0
104 terminado==0.8.1
105 testpath==0.4.2
106 toolz==0.9.0
107 torch==0.4.1
0108 torchvision==0.2.1
1 toolz==0.9.0
2 cloudpickle==0.6.1
3 Cython==0.29
4 pydot==1.2.4
5 dask==0.20.2
6 scikit-image==0.14.1
7 networkx==2.2
109 tornado==5.1.1
110 traitlets==4.3.2
111 urllib3==1.24.1
112 virtualenv==16.0.0
113 virtualenv-clone==0.4.0
114 virtualenvwrapper==4.8.2
115 wcwidth==0.1.7
116 webencodings==0.5.1
117 Werkzeug==0.14.1
118 widgetsnbextension==3.4.2
8119 word2vec==0.10.2
9120 xlrd==1.1.0
10 jieba==0.39
11 defusedxml==0.5.0
12 imgaug==0.2.6
13 Shapely==1.6.4.post2
14 nltk==3.3
15 torch==0.4.1
16 PyWavelets==1.0.1
17 imageio==2.4.1
18 python-jsonrpc-server==0.0.1
121 yapf==0.24.0