update: look at todo

main
Thamognya Kodi 2023-01-03 10:50:36 +07:00
parent f2bad06898
commit 0fba948649
2 changed files with 35 additions and 26 deletions

View File

@ -1,33 +1,42 @@
<template lang="pug"> <template lang="pug">
div div(v-if="loading")
.container.mx-auto.p-4 .flex.items-center.justify-center.h-screen(v-if="loading")
LoadingWheel
div(v-else)
.grid.grid-cols-1.place-content-center.align-middle.gap-y-5.h-screen.text-center
.grid.grid-cols-1.place-self-center
h1.text-5xl
a.url(href="/NLP") Internet-NLP
h1.text-2xl
a.url(href="/NLP/no-context/question-answering") Question Answering No Context
h1.text-2xl
a.url(href="/") Part of Internet-ML
.container.mx-auto
form(v-if="!loading", @submit.prevent="submitForm") form(v-if="!loading", @submit.prevent="submitForm")
label.block.font-bold.text-lg.mb-2(for="question") Question label.block.font-bold.text-lg.mb-2(for="question") Question
textarea#question.border.rounded.w-full.py-2.px-3( textarea#question.border.rounded.w-full.py-2.px-3(
v-model="form.question", v-model="form.question",
rows="5" rows="5"
) )
button.bg-blue-500.text-white.font-bold.py-2.px-4.rounded( button.bg-gray-500.text-white.font-bold.py-2.px-4.rounded(
class="hover:bg-blue-700", class="hover:bg-gray-700",
type="submit", type="submit",
v-if="form.submitCounter < 600" v-if="form.submitCounter < 600"
) )
| Submit | Submit
p.bg-red-500(v-if="form.submitCounter >= 600") Please wait for sometime as you have made 600 requests within one hour. p.bg-red-500(v-if="form.submitCounter >= 600") Please wait for sometime as you have made 600 requests within one hour.
.flex.items-center.justify-center.h-screen(v-if="loading")
loadingwheel
.mt-4.font-bold(v-if="answer !== null") .mt-4.font-bold(v-if="answer !== null")
p Question: {{ tmpquestion }} p Question: {{ tmpquestion }}
p.typed-text Answer: {{ typedAnswer }} p.typed-text Answer: {{ typedAnswer }}
p Urls: p Urls:
ul(v-if="typedAnswer.length === answer.length && urls !== null") ul(v-if="typedAnswer.length === answer.length && urls !== null")
li(v-for="url in urls", :key="url") li(v-for="url in urls", :key="url")
a.url(:href="url") - {{ url }} span -
a.url(:href="url") {{ url }}
</template> </template>
<script> <script>
import LoadingWheel from '~/components/LoadingWheel.vue' import LoadingWheel from '@/components/LoadingWheel.vue'
export default { export default {
components: { LoadingWheel }, components: { LoadingWheel },