matt HOFFNER commited on
Commit
a942b58
Β·
1 Parent(s): c79b0f3
src/components/ChatWindow.jsx CHANGED
@@ -26,10 +26,14 @@ function ChatWindow({
26
 
27
  const isReady = loadingStatus.progress === 1;
28
 
29
- const handleClear = () => {
30
  deleteMessages();
31
  }
32
 
 
 
 
 
33
  const handleSubmit = useCallback(async () => {
34
  if (isGenerating || !isReady) {
35
  return;
@@ -153,7 +157,7 @@ function ChatWindow({
153
  </Button>
154
 
155
  <FileLoader setFileText={setFileText} />
156
- <Button onClick={handleClear}>Clear</Button>
157
  </div>
158
 
159
  <div
 
26
 
27
  const isReady = loadingStatus.progress === 1;
28
 
29
+ const handleClearChat = () => {
30
  deleteMessages();
31
  }
32
 
33
+ const handleClearFile = () => {
34
+ setFileText(null);
35
+ }
36
+
37
  const handleSubmit = useCallback(async () => {
38
  if (isGenerating || !isReady) {
39
  return;
 
157
  </Button>
158
 
159
  <FileLoader setFileText={setFileText} />
160
+ <Button onClick={handleClearChat}>Clear Chat</Button>
161
  </div>
162
 
163
  <div
src/components/FileEmbedder.tsx CHANGED
@@ -42,9 +42,9 @@ export const FileEmbedder: React.FC<FileEmbedderProps> = ({ handleEmbed }) => {
42
  >
43
  <input {...getInputProps()} />
44
  {isDragActive ? (
45
- <p>Drop the files here...</p>
46
  ) : (
47
- <p><u>Click or drag and drop files here (PDF, MD, TXT)</u></p>
48
  )}
49
  </div>
50
  <aside>
 
42
  >
43
  <input {...getInputProps()} />
44
  {isDragActive ? (
45
+ <p>Drop the file here...</p>
46
  ) : (
47
+ <p style={{ cursor: 'pointer' }}>Click here or drag and drop file here (PDF, MD, TXT), then press Embed</p>
48
  )}
49
  </div>
50
  <aside>
src/components/Loader.jsx CHANGED
@@ -29,7 +29,8 @@ const Loader = () => {
29
  flexDirection: "column",
30
  gap: "10px",
31
  fontSize: "24px",
32
- textAlign: "center"
 
33
  }}
34
  >
35
  <div className="lg:hidden">
@@ -55,7 +56,7 @@ const Loader = () => {
55
  </div>
56
  <div>
57
  This will download the model (~4GB) and may take a few minutes. After the
58
- first time, it will be cached. It can be deleted in Dev Tools Cache Storage (tvmjs).
59
  </div>
60
 
61
  <button
 
29
  flexDirection: "column",
30
  gap: "10px",
31
  fontSize: "24px",
32
+ textAlign: "center",
33
+ fontFamily: "\"Comic Sans MS\", cursive, sans-serif;"
34
  }}
35
  >
36
  <div className="lg:hidden">
 
56
  </div>
57
  <div>
58
  This will download the model (~4GB) and may take a few minutes. After the
59
+ first time, it will be cached.
60
  </div>
61
 
62
  <button