diff --git a/web/frontend/components/LoadingWheel.vue b/web/frontend/components/LoadingWheel.vue new file mode 100644 index 0000000..5b6511a --- /dev/null +++ b/web/frontend/components/LoadingWheel.vue @@ -0,0 +1,51 @@ + +div(class="lds-ring") + div + div + div + div + + + diff --git a/web/frontend/package.json b/web/frontend/package.json index 4edb47f..8b98be1 100644 --- a/web/frontend/package.json +++ b/web/frontend/package.json @@ -44,6 +44,7 @@ "@nuxtjs/eslint-config-typescript": "^11.0.0", "@nuxtjs/eslint-module": "^3.1.0", "@nuxtjs/google-fonts": "^2.0.0", + "@nuxtjs/style-resources": "^1.2.1", "@nuxtjs/stylelint-module": "^4.1.0", "@nuxtjs/tailwindcss": "^5.3.3", "@vue/test-utils": "^1.3.0", @@ -61,7 +62,7 @@ "lint-staged": "^13.0.3", "postcss": "^8.4.20", "postcss-html": "^1.5.0", - "prettier": "^2.7.1", + "prettier": "^2.8.1", "sass": "^1.57.1", "stylelint": "^14.13.0", "stylelint-config-prettier": "^9.0.3", diff --git a/web/frontend/pages/NLP/index.vue b/web/frontend/pages/NLP/index.vue index 6c2f2ca..851270c 100644 --- a/web/frontend/pages/NLP/index.vue +++ b/web/frontend/pages/NLP/index.vue @@ -1,22 +1,21 @@ + +div + .grid.grid-cols-1.place-content-center.align-middle.gap-y-10.h-screen.text-center + .grid.grid-cols-1.place-self-center + h1.text-5xl + a.url(href='/') internet-nlp + h1.text-2xl + a.url(href='/') part of internet-ml + .grid.grid-cols-1.gap-y-4.place-items-center(class='md:grid-cols-2') + h1.text-2xl + a.url(href='/nlp/no-context') no context + h1.text-2xl + a.url(href='/nlp/context') context + + - - -html(lang="en") - body - div(class="grid grid-cols-1 place-content-center align-middle gap-y-10 h-screen text-center") - div(class="grid grid-cols-1 place-self-center") - h1(class="text-5xl") - a(href="/" class="url") internet-nlp - h1(class="text-2xl") - a(href="/" class="url") part of internet-ml - div(class="grid md:grid-cols-2 grid-cols-1 gap-y-4 place-items-center") - h1(class="text-2xl") - a(href="/nlp/no-context" class="url") no context - h1(class="text-2xl") - a(href="/nlp/context" class="url") context - diff --git a/web/frontend/pages/NLP/no-context/index.vue b/web/frontend/pages/NLP/no-context/index.vue index 6b214be..8902140 100644 --- a/web/frontend/pages/NLP/no-context/index.vue +++ b/web/frontend/pages/NLP/no-context/index.vue @@ -1,24 +1,23 @@ + +div + .grid.grid-cols-1.place-content-center.align-middle.gap-y-10.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') No context tools + h1.text-2xl + a.url(href='/') Part of Internet-ML + .grid.grid-cols-1.gap-y-4.place-items-center(class='md:grid-cols-2') + h1.text-2xl + a.url(href='/NLP/no-context/question-answer') Question Answering + h1.text-2xl + a.url(href='/NLP/context/NLI') NLI + + - - -html(lang="en") - body - div(class="grid grid-cols-1 place-content-center align-middle gap-y-10 h-screen text-center") - div(class="grid grid-cols-1 place-self-center") - h1(class="text-5xl") - a(href="/NLP" class="url") Internet-NLP - h1(class="text-2xl") - a(href="/NLP/no-context" class="url") No context tools - h1(class="text-2xl") - a(href="/" class="url") Part of Internet-ML - div(class="grid md:grid-cols-2 grid-cols-1 gap-y-4 place-items-center") - h1(class="text-2xl") - a(href="/NLP/no-context/question-answer" class="url") Question Answering - h1(class="text-2xl") - a(href="/NLP/context/NLI" class="url") NLI - diff --git a/web/frontend/pages/NLP/no-context/question-answer.vue b/web/frontend/pages/NLP/no-context/question-answer.vue index c1870e3..e0ed95d 100644 --- a/web/frontend/pages/NLP/no-context/question-answer.vue +++ b/web/frontend/pages/NLP/no-context/question-answer.vue @@ -1,49 +1,41 @@ - - - - Question - +div + .container.mx-auto.p-4 + form(v-if="!loading", @submit.prevent="submitForm") + label.block.font-bold.text-lg.mb-2(for="question") Question + textarea#question.border.rounded.w-full.py-2.px-3( + v-model="form.question", rows="5" - > - - Submit - - - - - - - - - - - - Question: {{ tmpquestion }} - Answer: {{ typedAnswer }} - Urls: - - - - {{ url }} - - - - + ) + button.bg-blue-500.text-white.font-bold.py-2.px-4.rounded( + class="hover:bg-blue-700", + type="submit", + v-if="form.submitCounter < 600" + ) + | Submit + 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") + p Question: {{ tmpquestion }} + p.typed-text Answer: {{ typedAnswer }} + p Urls: + ul(v-if="typedAnswer.length === answer.length && urls !== null") + li(v-for="url in urls", :key="url") + a.url(:href="url") - {{ url }} + -
Question: {{ tmpquestion }}
Answer: {{ typedAnswer }}
Urls: