Skip to content

Commit

Permalink
Merge pull request #123 from arc53/small-fe-fixes
Browse files Browse the repository at this point in the history
Small fe fixes
  • Loading branch information
pabik committed Feb 24, 2023
2 parents 8f0f664 + 90ec40c commit 8e496ca
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 17 deletions.
57 changes: 43 additions & 14 deletions frontend/src/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,78 @@
export default function About() {
return (
//Parent div for all content shown through App.tsx routing needs to have this styling. Might change when state management is updated.
<div className="mx-6 grid min-h-screen">
<article className=" mx-auto my-auto flex w-full max-w-6xl flex-col place-items-center gap-6 rounded-lg bg-gray-100 p-6 text-jet lg:p-10 xl:p-16">
<p className="text-3xl font-semibold">About DocsGPT 🦖</p>
<p className="mt-4 text-xl font-bold">
<div className="mx-36 grid min-h-screen">
<article className=" place-items-left mx-auto my-auto flex w-full max-w-6xl flex-col gap-6 rounded-lg bg-gray-100 p-6 text-jet lg:p-10 xl:p-16">
<p className="text-3xl">About DocsGPT 🦖</p>
<p className="mt-4">
Find the information in your documentation through AI-powered
open-source chatbot. Powered by GPT-3, Faiss and LangChain.
<a
className="text-blue-500"
href="https://github.com/arc53/DocsGPT"
target="_blank"
rel="noreferrer"
>
{' '}
open-source{' '}
</a>
chatbot. Powered by GPT-3, Faiss and LangChain.
</p>

<div>
<p className="text-lg">
<p>
If you want to add your own documentation, please follow the
instruction below:
</p>
<p className="mt-4 text-lg">
<p className="mt-4 ml-2">
1. Navigate to{' '}
<span className="bg-gray-200 italic"> /application</span> folder
</p>
<p className="mt-4 text-lg">
<p className="mt-4 ml-2">
2. Install dependencies from{' '}
<span className="bg-gray-200 italic">
pip install -r requirements.txt
</span>
</p>
<p className="mt-4 text-lg">
<p className="mt-4 ml-2">
3. Prepare a <span className="bg-gray-200 italic">.env</span> file.
Copy <span className="bg-gray-200 italic">.env_sample</span> and
create <span className="bg-gray-200 italic">.env</span> with your
OpenAI API token
</p>
<p className="mt-4 text-lg">
<p className="mt-4 ml-2">
4. Run the app with{' '}
<span className="bg-gray-200 italic">python app.py</span>
</p>
</div>

<p className="text-lg">
<p>
Currently It uses python pandas documentation, so it will respond to
information relevant to pandas. If you want to train it on different
documentation - please follow this guide.
documentation - please follow
<a
className="text-blue-500"
href="https://github.com/arc53/DocsGPT/wiki/How-to-train-on-other-documentation"
target="_blank"
rel="noreferrer"
>
{' '}
this guide
</a>
.
</p>

<p className="mt-4 text-lg">
If you want to launch it on your own server - follow this guide.
<p className="mt-4 text-left">
If you want to launch it on your own server - follow
<a
className="text-blue-500"
href="https://github.com/arc53/DocsGPT/wiki/Hosting-the-app"
target="_blank"
rel="noreferrer"
>
{' '}
this guide
</a>
.
</p>
</article>
</div>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export default function Hero({ className = '' }: { className?: string }) {
<p className="mb-10 text-center text-4xl font-semibold">
DocsGPT <span className="text-3xl">🦖</span>
</p>
<p className="mb-3 text-center">
<p className="mb-3 text-center text-gray-2000">
Welcome to DocsGPT, your technical documentation assistant!
</p>
<p className="mb-3 text-center">
<p className="mb-3 text-center text-gray-2000">
Enter a query related to the information in the documentation you
selected to receive and we will provide you with the most relevant
answers.
</p>
<p className="text-center">
<p className="text-center text-gray-2000">
Start by entering your query in the input field below and we will do the
rest!
</p>
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/conversation/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ export default function Conversation() {
ref={inputRef}
contentEditable
className={`border-000000 overflow-x-hidden; max-h-24 min-h-[2.6rem] w-full overflow-y-auto rounded-xl border bg-white p-2 pr-9 opacity-100 focus:border-2 focus:outline-none`}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
if (inputRef.current?.textContent && status !== 'loading') {
handleQuestion(inputRef.current.textContent);
inputRef.current.textContent = '';
}
}
}}
></div>
{status === 'loading' ? (
<img
Expand Down

0 comments on commit 8e496ca

Please sign in to comment.