-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
176 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: gunicorn app:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from flask import Flask, request, render_template | ||
|
||
from get_synonyms import get_words, get_best_words | ||
|
||
app = Flask(__name__) | ||
|
||
|
||
@app.route('/') | ||
def index(): | ||
return render_template('index.html') | ||
|
||
|
||
@app.route('/', methods=['POST']) | ||
def index_post(): | ||
word = request.form['word'] | ||
sent = request.form['sent'] | ||
synsets = get_words(word) | ||
best_words = get_best_words(word, sent, synsets) | ||
return render_template('index.html', synsets=synsets, best_words=best_words, word=word, sentence=sent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
absl-py==0.9.0 | ||
appnope==0.1.0 | ||
astor==0.8.1 | ||
astunparse==1.6.3 | ||
attrs==19.3.0 | ||
backcall==0.1.0 | ||
bleach==3.1.5 | ||
cachetools==4.1.0 | ||
certifi==2020.4.5.1 | ||
chardet==3.0.4 | ||
click==7.1.2 | ||
decorator==4.4.2 | ||
defusedxml==0.6.0 | ||
entrypoints==0.3 | ||
flake8==3.7.8 | ||
Flask==1.1.2 | ||
future==0.18.2 | ||
gast==0.3.3 | ||
google-auth==1.15.0 | ||
google-auth-oauthlib==0.4.1 | ||
google-pasta==0.2.0 | ||
grpcio==1.29.0 | ||
gunicorn==20.0.4 | ||
h5py==2.10.0 | ||
idna==2.9 | ||
importlib-metadata==1.6.0 | ||
ipykernel==5.3.0 | ||
ipython==7.14.0 | ||
ipython-genutils==0.2.0 | ||
ipywidgets==7.5.1 | ||
itsdangerous==1.1.0 | ||
jedi==0.17.0 | ||
Jinja2==2.11.2 | ||
joblib==0.15.1 | ||
jsonschema==3.2.0 | ||
jupyter==1.0.0 | ||
jupyter-client==6.1.3 | ||
jupyter-console==6.1.0 | ||
jupyter-core==4.6.3 | ||
Keras-Applications==1.0.8 | ||
Keras-Preprocessing==1.1.2 | ||
Mako==1.1.0 | ||
Markdown==3.1.1 | ||
MarkupSafe==1.1.1 | ||
mccabe==0.6.1 | ||
mistune==0.8.4 | ||
nbconvert==5.6.1 | ||
nbformat==5.0.6 | ||
nltk==3.5 | ||
notebook==6.0.3 | ||
numpy==1.17.2 | ||
oauthlib==3.1.0 | ||
opencv-python==4.2.0.34 | ||
opt-einsum==3.2.1 | ||
packaging==20.4 | ||
pandocfilters==1.4.2 | ||
parso==0.7.0 | ||
pdoc3==0.7.0 | ||
pexpect==4.8.0 | ||
pickleshare==0.7.5 | ||
Pillow==6.0.0 | ||
prometheus-client==0.8.0 | ||
prompt-toolkit==3.0.5 | ||
protobuf==3.12.2 | ||
ptyprocess==0.6.0 | ||
pyasn1==0.4.8 | ||
pyasn1-modules==0.2.8 | ||
pycodestyle==2.5.0 | ||
pyflakes==2.1.1 | ||
Pygments==2.6.1 | ||
pyparsing==2.4.7 | ||
pyrsistent==0.16.0 | ||
python-dateutil==2.8.1 | ||
pyzmq==19.0.1 | ||
qtconsole==4.7.4 | ||
QtPy==1.9.0 | ||
regex==2020.6.8 | ||
requests==2.23.0 | ||
requests-oauthlib==1.3.0 | ||
rsa==4.0 | ||
scipy==1.4.1 | ||
Send2Trash==1.5.0 | ||
six==1.15.0 | ||
tensorboard==2.2.1 | ||
tensorboard-plugin-wit==1.6.0.post3 | ||
tensorflow==2.2.0 | ||
tensorflow-estimator==2.2.0 | ||
termcolor==1.1.0 | ||
terminado==0.8.3 | ||
testpath==0.4.4 | ||
torch==1.5.0 | ||
torchvision==0.6.0 | ||
tornado==6.0.4 | ||
tqdm==4.46.1 | ||
traitlets==4.3.3 | ||
urllib3==1.25.9 | ||
wcwidth==0.1.9 | ||
webencodings==0.5.1 | ||
Werkzeug==1.0.1 | ||
widgetsnbextension==3.5.1 | ||
wrapt==1.12.1 | ||
zipp==3.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<title>Contextual Thesaurus</title> | ||
<form method="POST"> | ||
Word: <input name="word"> | ||
Sentence: <input name="sent"> | ||
<input type="submit"> | ||
</form> | ||
{% if synsets %} | ||
<div>Given Word: {{word}}</div> | ||
<div>Given Sentence: {{sentence}}</div> | ||
<div>Possible Synsets: {{synsets}}</div> | ||
<div>Determined Synset: {{best_words}}</div> | ||
{% else %} | ||
<div>This doesnt really work that well</div> | ||
{% endif %} |
Empty file.