Skip to content

Commit

Permalink
🦔🧪 -> Adding orbital period calculations, plus flask+jupyter connecto…
Browse files Browse the repository at this point in the history
…r in the server route for [#1] [HDASH-4] [SCD-11]
  • Loading branch information
Gizmotronn committed Oct 10, 2022
1 parent ad74da6 commit b0d36a5
Show file tree
Hide file tree
Showing 15 changed files with 862 additions and 1 deletion.
247 changes: 247 additions & 0 deletions Ansible/Generator/Components/Binning.ipynb

Large diffs are not rendered by default.

File renamed without changes.
332 changes: 332 additions & 0 deletions Ansible/Generator/Components/Period.ipynb

Large diffs are not rendered by default.

239 changes: 239 additions & 0 deletions Ansible/Generator/Components/PhaseFolding.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@
"metadata": {},
"source": [
"Deepnote file + further documentation: \n",
"https://colab.research.google.com/drive/19qF5n53mx2cLDoqx2TyJAJlfdfdvHjXm?usp=sharing#scrollTo=3SyMADPvl1qL "
"https://colab.research.google.com/drive/19qF5n53mx2cLDoqx2TyJAJlfdfdvHjXm?usp=sharing#scrollTo=3SyMADPvl1qL \n",
"https://github.com/Arboghast/Exoplanet-Detection-Models/blob/master/Server/server.py"
]
}
],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions Ansible/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ astropy = "*"
pydi = "*"
bazel = "*"
abseil = "*"
matplotlib = "*"
ipywidgets = "*"

[dev-packages]

Expand Down
Empty file removed Generator/Components/Binning.ipynb
Empty file.
1 change: 1 addition & 0 deletions server/notebook/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/venv
13 changes: 13 additions & 0 deletions server/notebook/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
lightkurve
flask

[dev-packages]

[requires]
python_version = "3.8.9"
24 changes: 24 additions & 0 deletions server/notebook/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from flask import Flask, render_template
from sklearn.datasets import load_iris
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import train_test_split
import pickle

app = Flask(__name__)

@app.route("/")
def home():
iris = load_iris()
model = KNeighborsClassifier(n_neighbors = 3)
X_train, x_test, y_train, y_test = train_test_split(iris.data, iris.target)
model.fit(X_train, y_train)
pickle.dumps(model, open("iris.pkl", "wb"))

return render_template("home.html")

@app.route("/predict", methods=["GET", "POST"])
def predict():
pass

if __name__ == "__main__":
app.run(debug=True)
1 change: 1 addition & 0 deletions server/notebook/templates/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html>
1 change: 1 addition & 0 deletions server/notebook/templates/result.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html>

0 comments on commit b0d36a5

Please sign in to comment.