diff --git a/.ipynb_checkpoints/OVERVIEW-checkpoint.md b/.ipynb_checkpoints/OVERVIEW-checkpoint.md new file mode 100644 index 0000000..c5146b6 --- /dev/null +++ b/.ipynb_checkpoints/OVERVIEW-checkpoint.md @@ -0,0 +1,20 @@ + +## Intro + +Provide a short overview of your algorithm that explains the value and primary use cases. + +## Usage + +``` +def function_name(conf={}) +``` + +## Example + +Provide and explain examples of input and output for your algorithm. + +`Code` + +``` +please input your example code +``` diff --git a/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/.ipynb_checkpoints/Untitled-checkpoint.ipynb deleted file mode 100644 index 2fd6442..0000000 --- a/.ipynb_checkpoints/Untitled-checkpoint.ipynb +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cells": [], - "metadata": {}, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/.ipynb_checkpoints/main-checkpoint.py b/.ipynb_checkpoints/main-checkpoint.py index 96e581b..28d719b 100644 --- a/.ipynb_checkpoints/main-checkpoint.py +++ b/.ipynb_checkpoints/main-checkpoint.py @@ -3,11 +3,10 @@ import sys # Import necessary packages -# from modules import json_parser +from modules import json_parser from modules import json_parser from modules import Client - -# from write_poem import start_model +from write_poem import start_model # Initialise Client object client = Client(api_key='33799e1c5d6fa05fdd7dec3aa7aad868445d1c737edcf9c37fa89cb3b39cb2d9', @@ -22,22 +21,19 @@ # Make controller alias for further use controller = client.controller - -# writer = start_model() +writer = start_model() def handle(conf): # paste your code here - # path = os.getcwd() # 获取当前工作目录 - # print(path) - # if conf['style'] == ['藏头诗']: - # poetry = writer.cangtou(conf['Chinese_word']) - # elif conf['style'] == ['藏字诗']: - # poetry = writer.hide_words(conf['Chinese_word']) - # else: - # poetry = writer.rhyme_verse() - # return {"Poetry": poetry} - return {"Poetry": 'asadd'} + if conf['style'] == ['藏头诗']: + poetry = writer.cangtou(conf['Chinese_word']) + elif conf['style'] == ['藏字诗']: + poetry = writer.hide_words(conf['Chinese_word']) + else: + poetry = writer.rhyme_verse() + return {"Poetry": poetry} + # return {"Poetry": 'asadd'} # if __name__ == '__main__': diff --git a/Untitled.ipynb b/Untitled.ipynb deleted file mode 100644 index d5c0f41..0000000 --- a/Untitled.ipynb +++ /dev/null @@ -1,67 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "# You can use other public modules via our Client object with module's identifier\n", - "# and parameters.\n", - "# For more detailes, please see our online document - https://momodel.github.io/docs/#\n", - "\n", - "import os\n", - "import sys\n", - "\n", - "# Define root path\n", - "sys.path.append('../')\n", - "\n", - "# Import necessary packages\n", - "from modules import json_parser\n", - "from modules import Client\n", - "\n", - "# Initialise Client object\n", - "client = Client(api_key='33799e1c5d6fa05fdd7dec3aa7aad868445d1c737edcf9c37fa89cb3b39cb2d9',\n", - " project_id='5bfd118f1afd942b66b36b30', user_ID='yangsaisai',\n", - " project_type='app', source_file_path='Untitled.ipynb')\n", - "\n", - "# Make run/train/predict command alias for further use\n", - "run = client.run\n", - "train = client.train\n", - "predict = client.predict\n", - "\n", - "# Make controller alias for further use\n", - "controller = client.controller\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.5.2" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/main.py b/main.py index 96e581b..28d719b 100644 --- a/main.py +++ b/main.py @@ -3,11 +3,10 @@ import sys # Import necessary packages -# from modules import json_parser +from modules import json_parser from modules import json_parser from modules import Client - -# from write_poem import start_model +from write_poem import start_model # Initialise Client object client = Client(api_key='33799e1c5d6fa05fdd7dec3aa7aad868445d1c737edcf9c37fa89cb3b39cb2d9', @@ -22,22 +21,19 @@ # Make controller alias for further use controller = client.controller - -# writer = start_model() +writer = start_model() def handle(conf): # paste your code here - # path = os.getcwd() # 获取当前工作目录 - # print(path) - # if conf['style'] == ['藏头诗']: - # poetry = writer.cangtou(conf['Chinese_word']) - # elif conf['style'] == ['藏字诗']: - # poetry = writer.hide_words(conf['Chinese_word']) - # else: - # poetry = writer.rhyme_verse() - # return {"Poetry": poetry} - return {"Poetry": 'asadd'} + if conf['style'] == ['藏头诗']: + poetry = writer.cangtou(conf['Chinese_word']) + elif conf['style'] == ['藏字诗']: + poetry = writer.hide_words(conf['Chinese_word']) + else: + poetry = writer.rhyme_verse() + return {"Poetry": poetry} + # return {"Poetry": 'asadd'} # if __name__ == '__main__': diff --git a/project_requirements.txt b/project_requirements.txt index e88b286..fff8e36 100644 --- a/project_requirements.txt +++ b/project_requirements.txt @@ -1,19 +1,122 @@ +absl-py==0.6.1 +alembic==1.0.3 +astor==0.7.1 +autopep8==1.4 +backcall==0.1.0 +bleach==3.0.2 +certifi==2018.10.15 +chardet==3.0.4 +cloudpickle==0.6.1 +cycler==0.10.0 +Cython==0.29 +dask==0.20.2 +decorator==4.3.0 +defusedxml==0.5.0 +entrypoints==0.2.3 +future==0.16.0 +gast==0.2.0 +grpcio==1.16.0 +h5py==2.8.0 +html5lib==1.0.1 +idna==2.7 +imageio==2.4.1 +imgaug==0.2.6 +ipykernel==5.1.0 +ipython==7.1.1 +ipython-genutils==0.2.0 +ipywidgets==7.4.2 +jedi==0.13.1 +jieba==0.39 +Jinja2==2.10 +jsonschema==2.6.0 +jupyter==1.0.0 +jupyter-client==5.2.3 +jupyter-console==6.0.0 +jupyter-core==4.4.0 +jupyterhub==0.8.1 +jupyterlab==0.31.1 +jupyterlab-launcher==0.10.5 +Keras==2.2.4 +Keras-Applications==1.0.6 +Keras-Preprocessing==1.0.5 +kiwisolver==1.0.1 +Mako==1.0.7 +Markdown==3.0.1 +MarkupSafe==1.0 +matplotlib==3.0.2 +mccabe==0.6.1 +mistune==0.8.4 +nbconvert==5.4.0 +nbformat==4.4.0 +networkx==2.2 +nltk==3.3 +notebook==5.7.0 +numpy==1.15.2 +opencv-python==3.4.3.18 +pamela==0.3.0 +pandas==0.23.4 +pandocfilters==1.4.2 +parso==0.3.1 +pbr==5.1.1 +pexpect==4.6.0 +pickleshare==0.7.5 +Pillow==5.3.0 +pluggy==0.7.1 +prometheus-client==0.4.2 +prompt-toolkit==2.0.7 +protobuf==3.6.1 +ptyprocess==0.6.0 +pycodestyle==2.4.0 +pycurl==7.43.0 +pydocstyle==2.1.1 +pydot==1.2.4 +pyflakes==2.0.0 +Pygments==2.2.0 +pygobject==3.20.0 +pyparsing==2.3.0 +python-apt==1.1.0b1+ubuntu0.16.4.2 +python-dateutil==2.7.3 +python-editor==1.0.3 +python-jsonrpc-server==0.0.1 +python-language-server==0.21.2 +python-oauth2==1.1.0 +pytz==2018.5 +PyWavelets==1.0.1 +PyYAML==3.13 +pyzmq==17.1.2 +qtconsole==4.4.2 +requests==2.20.0 +rope==0.11.0 +scikit-image==0.14.1 +scikit-learn==0.20.0 +scipy==1.1.0 +seaborn==0.9.0 +Send2Trash==1.5.0 +Shapely==1.6.4.post2 +simplegeneric==0.8.1 +six==1.11.0 +sklearn==0.0 +snowballstemmer==1.2.1 +SQLAlchemy==1.2.14 +stevedore==1.29.0 +tensorboard==1.11.0 +tensorflow==1.12.0 +termcolor==1.1.0 +terminado==0.8.1 +testpath==0.4.2 +toolz==0.9.0 +torch==0.4.1 torchvision==0.2.1 -toolz==0.9.0 -cloudpickle==0.6.1 -Cython==0.29 -pydot==1.2.4 -dask==0.20.2 -scikit-image==0.14.1 -networkx==2.2 +tornado==5.1.1 +traitlets==4.3.2 +urllib3==1.24.1 +virtualenv==16.0.0 +virtualenv-clone==0.4.0 +virtualenvwrapper==4.8.2 +wcwidth==0.1.7 +webencodings==0.5.1 +Werkzeug==0.14.1 +widgetsnbextension==3.4.2 word2vec==0.10.2 xlrd==1.1.0 -jieba==0.39 -defusedxml==0.5.0 -imgaug==0.2.6 -Shapely==1.6.4.post2 -nltk==3.3 -torch==0.4.1 -PyWavelets==1.0.1 -imageio==2.4.1 -python-jsonrpc-server==0.0.1 +yapf==0.24.0