{isLogin ? 'Welcome back! Please sign in.' : 'Join us today! Create an account.'}
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+ {isLogin ? (
+
+ ) : null}
+
+
+
+
+
+
+
+
+
+
- )
-}
+ );
+};
-export default Login
\ No newline at end of file
+export default Login;
diff --git a/server/aiAPI/fetchFlash.py b/server/aiAPI/fetchFlash.py
new file mode 100644
index 0000000..4bdb4ac
--- /dev/null
+++ b/server/aiAPI/fetchFlash.py
@@ -0,0 +1,18 @@
+import openai
+
+
+def flashCards (input) -> list[dict]:
+ api_key = "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"
+
+ prompt = "Give me an array of 5 objects with fields prompt and answer where prompt has the question and answer has the answer use this input as the material:" + input
+
+ response = openai.Completion.create(
+ engine="text-davinci-002",
+ prompt=prompt,
+ max_tokens=3800,
+ api_key=api_key
+ )
+
+ answer = response.choices[0].text
+ print(answer)
+ return answer
diff --git a/server/aiAPI/test.py b/server/aiAPI/test.py
new file mode 100644
index 0000000..874dacb
--- /dev/null
+++ b/server/aiAPI/test.py
@@ -0,0 +1,17 @@
+import fetchFlash
+
+input = """
+ Optical Disk: an optical disc drive (ODD) is a disk drive that uses laser light as part of the process
+ of reading or writing data to or from optical discs. Some drives can only read from discs, but recent
+ drives are commonly both readers and recorders, also called burners or writers. Compact discs,
+ DVDs, and Blu-ray discs are common types of optical media which can be read and recorded by
+ such drives. Optical drive is the generic name; drives are usually described as "CD" "DVD", or
+ "Bluray", followed by "drive", "writer", etc. There are three main types of optical media: CD,
+ DVD, and Blu-ray disc. CDs can store up to 700 megabytes (MB) of data and DVDs can store up
+ to 8.4 GB of data. Blu-ray discs, which are the newest type of optical media, can store up to 50
+ GB of data. This storage capacity is a clear advantage over the floppy disk storage media (a
+ magnetic media), which only has a capacity of 1.44 MB.
+ """
+
+fetchFlash.flashCards()
+