You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
2.8 KiB

  1. <template>
  2. <v-content>
  3. <v-container
  4. fluid
  5. fill-height
  6. >
  7. <v-layout>
  8. <v-flex>
  9. <v-form
  10. ref="form"
  11. lazy-validation
  12. >
  13. <v-card>
  14. <v-card flat>
  15. <v-card-title>
  16. Objective
  17. </v-card-title>
  18. <v-card-text>
  19. <v-radio-group v-model="selectedTask">
  20. <v-radio
  21. v-for="(task, i) in tasks"
  22. :key="i"
  23. :label="task"
  24. :value="task"
  25. />
  26. </v-radio-group>
  27. </v-card-text>
  28. </v-card>
  29. <v-card flat max-width="800">
  30. <v-card-title>
  31. Import text items
  32. </v-card-title>
  33. <v-card-text>
  34. <v-radio-group v-model="selectedFormat">
  35. <v-radio
  36. v-for="(format, i) in formats"
  37. :key="i"
  38. :label="format.text"
  39. :value="format"
  40. />
  41. </v-radio-group>
  42. <v-sheet color="black white--text" class="pa-3">
  43. {{ selectedFormat }}
  44. </v-sheet>
  45. </v-card-text>
  46. </v-card>
  47. <v-card flat max-width="500">
  48. <v-card-title>
  49. Select file
  50. </v-card-title>
  51. <v-card-text>
  52. <v-file-input :accept="acceptType" label="File input" />
  53. </v-card-text>
  54. </v-card>
  55. <v-card-actions>
  56. <v-btn>
  57. Import Dataset
  58. </v-btn>
  59. </v-card-actions>
  60. </v-card>
  61. </v-form>
  62. </v-flex>
  63. </v-layout>
  64. </v-container>
  65. </v-content>
  66. </template>
  67. <script>
  68. export default {
  69. layout: 'project',
  70. data() {
  71. return {
  72. selectedTask: null,
  73. selectedFormat: null,
  74. tasks: [
  75. 'Text Classification',
  76. 'Sequence Labeling',
  77. 'Seq2seq'
  78. ],
  79. formats: [
  80. {
  81. type: 'csv',
  82. text: 'Upload a CSV file from your computer',
  83. accept: '.csv'
  84. },
  85. {
  86. type: 'plain',
  87. text: 'Upload text items from your computer',
  88. accept: '.txt'
  89. },
  90. {
  91. type: 'json',
  92. text: 'Upload a JSON file from your computer',
  93. accept: '.json,.jsonl'
  94. }
  95. ]
  96. }
  97. },
  98. computed: {
  99. acceptType() {
  100. if (this.selectedFormat) {
  101. return this.selectedFormat.accept
  102. } else {
  103. return '.txt,.csv,.json,.jsonl'
  104. }
  105. }
  106. },
  107. methods: {
  108. }
  109. }
  110. </script>
  111. <style scoped>
  112. body pre {
  113. color: white;
  114. }
  115. </style>