You need to sign in or sign up before continuing.
Yoonjunhyeon

model과 백엔드 연결

...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
103 style="margin-left: 5px; margin-top: -18px; background-color: #fff; width: 110px; text-align: center;font-size: 14px; color: #5a5a5a; font-weight: 500" 103 style="margin-left: 5px; margin-top: -18px; background-color: #fff; width: 110px; text-align: center;font-size: 14px; color: #5a5a5a; font-weight: 500"
104 >Generated Tags</div> 104 >Generated Tags</div>
105 <v-chip-group column> 105 <v-chip-group column>
106 - <v-chip color="secondary" v-for="(tag, index) in generatedTag" :key="index">{{ tag.name }} : {{tag.accuracy}}</v-chip> 106 + <v-chip color="secondary" v-for="(tag, index) in generatedTag" :key="index">{{ tag[0] }} : {{tag[1]}}</v-chip>
107 </v-chip-group> 107 </v-chip-group>
108 </v-card> 108 </v-card>
109 <v-card outlined class="pa-3 mx-5 mt-8" elevation="0" min-height="67"> 109 <v-card outlined class="pa-3 mx-5 mt-8" elevation="0" min-height="67">
...@@ -136,20 +136,8 @@ export default { ...@@ -136,20 +136,8 @@ export default {
136 data() { 136 data() {
137 return { 137 return {
138 videoFile: '', 138 videoFile: '',
139 - YoutubeUrl: [ 139 + YoutubeUrl: [],
140 - 'https://www.youtube.com/watch?v=8KrzgB1NWKI', 140 + generatedTag: [],
141 - 'https://www.youtube.com/watch?v=YfI7iQrqKGg',
142 - 'https://www.youtube.com/watch?v=AoO9vUCqgsw',
143 - 'https://www.youtube.com/watch?v=fRYDHLseGLg',
144 - 'https://www.youtube.com/watch?v=WOMUrZ9owhA',
145 - ],
146 - generatedTag: [
147 - { name: 'mobile-phone', accuracy: '35%' },
148 - { name: 'smartphone', accuracy: '33%' },
149 - { name: 'concert', accuracy: '14%' },
150 - { name: 'car', accuracy: '11%' },
151 - { name: 'dance', accuracy: '5%' },
152 - ],
153 threshold: 5, 141 threshold: 5,
154 successDialog: false, 142 successDialog: false,
155 errorDialog: false, 143 errorDialog: false,
...@@ -173,9 +161,15 @@ export default { ...@@ -173,9 +161,15 @@ export default {
173 headers: { 'Content-Type': 'multipart/form-data' }, 161 headers: { 'Content-Type': 'multipart/form-data' },
174 }) 162 })
175 .then((r) => { 163 .then((r) => {
164 + const tag = r.data.tag_result;
165 + const url = r.data.video_result;
166 + url.forEach((element) => {
167 + this.YoutubeUrl.push(element.video_url);
168 + });
169 + this.generatedTag = tag;
176 this.loadingProcess = false; 170 this.loadingProcess = false;
177 this.successDialog = true; 171 this.successDialog = true;
178 - console.log(r); 172 + console.log(tag, url);
179 }) 173 })
180 .catch((e) => { 174 .catch((e) => {
181 this.errorDialog = true; 175 this.errorDialog = true;
......