project-model-interaction-window.vue 951 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div class="project-model-interaction-window">
  3. <div>
  4. <button-input type="primary"
  5. @click="predict">predict all images
  6. </button-input>
  7. </div>
  8. <div>
  9. <button-input type="primary"
  10. @click="fit">fit model with new data
  11. </button-input>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. import ButtonInput from "@/components/base/button-input";
  17. export default {
  18. name: "project-model-interaction-window",
  19. components: {ButtonInput},
  20. props: ['currentProject', 'socket'],
  21. methods: {
  22. predict: function () {
  23. this.socket.post('/projects/' + this.currentProject.id, {'predictAll': true});
  24. },
  25. fit: function () {
  26. this.socket.post('/projects/' + this.currentProject.id, {'fit': true});
  27. }
  28. }
  29. }
  30. </script>
  31. <style scoped>
  32. .project-model-interaction-window {
  33. padding: 1rem;
  34. }
  35. .project-model-interaction-window > div {
  36. margin-bottom: 1rem;
  37. }
  38. </style>