diff --git a/prediction_service/templates/prediction_service/create_post.html b/prediction_service/templates/prediction_service/create_post.html index fbfa686cc3cb2a940761c7582ed7acb33f1cca69..5d7f15edcdc7f0b99a487fd887fce5da8b194b65 100644 --- a/prediction_service/templates/prediction_service/create_post.html +++ b/prediction_service/templates/prediction_service/create_post.html @@ -1,31 +1,34 @@ -{% extends "prediction_service/base.html" %} +{% include "prediction_service/base.html" %} +{% include "prediction_service/navbar.html" %} + +<br> {% block content %} <div class="container d-flex justify-content-center align-items-center" style="height: 100vh;"> - <div class="card"> - <div class="card-body"> - <h2 class="card-title text-center">Create a New Post</h2> - <form method="post" enctype="multipart/form-data"> - {% csrf_token %} - - <div class="form-group"> - <label for="title">Title:</label> - <input type="text" class="form-control" name="title" id="title"> - </div> - - <div class="form-group"> - <label for="content">Content:</label> - <textarea class="form-control" name="content" id="content" rows="5"></textarea> - </div> - - <div class="form-group"> - <label for="modelFile">Model File:</label> - <input type="file" class="form-control-file" name="modelFile" id="modelFile" accept=""> - </div> - - <button type="submit" class="btn btn-primary">Submit</button> - </form> + <div class="card"> + <div class="card-body"> + <h2 class="card-title text-center">Create a New Post</h2> + <form method="post" enctype="multipart/form-data"> + {% csrf_token %} + + <div class="form-group"> + <label for="title">Title:</label> + <input type="text" class="form-control" name="title" id="title"> + </div> + + <div class="form-group"> + <label for="content">Content:</label> + <input type="text" class="form-control" name="content" id="content"> + </div> + + <div class="form-group"> + <label for="modelFile">Model File:</label> + <input type="file" class="form-control-file" name="modelFile" id="modelFile" accept=""> + </div> + + <button type="submit" class="btn btn-primary">Submit</button> + </form> + </div> </div> - </div> </div> {% endblock %} diff --git a/prediction_service/templates/prediction_service/model.html b/prediction_service/templates/prediction_service/model.html index 4c2612f46519b5b286d4077ed3a34f39eb52611b..894313c7529da953c382c1357803e91d2f7a6f15 100644 --- a/prediction_service/templates/prediction_service/model.html +++ b/prediction_service/templates/prediction_service/model.html @@ -3,29 +3,27 @@ <br> -<div class="container"> - - <h1>ML-Model</h1> - - <!-- <img src="data:image/png;base64,{{ img_str }}" alt="PIL Image"> --> - - <!-- <h2>Model Layers: {{ layer }}</h2> --> - - <p>Upload an image of one of the following cars and receive a prediction:</p> - <ul> - <li>Acura</li> - <li>Alfa Romeo</li> - <li>Aston Martin</li> - <li>Audi</li> - <li>Bentley</li> - </ul> - - <form action="/mlmodel/{{ modelID }}/" method="post" enctype="multipart/form-data"> - - {% csrf_token %} - <input type="file" name="photo" id="photoInput" accept="image/*"> - <button type="submit">Upload Photo</button> - </form> - -</div> +<div class="container d-flex justify-content-center align-items-center" style="height: 100vh;"> + <div class="card"> + <div class="card-body"> + <h1 class="card-title text-center">ML-Model</h1> + <p>Upload an image of one of the following cars and receive a prediction:</p> + <ul> + <li>Acura</li> + <li>Alfa Romeo</li> + <li>Aston Martin</li> + <li>Audi</li> + <li>Bentley</li> + </ul> + + <form action="/mlmodel/{{ modelID }}/" method="post" enctype="multipart/form-data"> + {% csrf_token %} + <div class="form-group"> + <input type="file" class="form-control-file" name="photo" id="photoInput" accept="image/*"> + </div> + <button type="submit" class="btn btn-primary">Upload Photo</button> + </form> + </div> + </div> + </div>