Spaces:
Running
Running
Commit ·
4d00cd6
1
Parent(s): f5a3d5a
commit 0000008
Browse files- src/FileUploadForm.js +6 -2
src/FileUploadForm.js
CHANGED
|
@@ -50,7 +50,7 @@ const FileUploadForm = () => {
|
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
|
| 56 |
const theme = useTheme();
|
|
@@ -131,7 +131,11 @@ const FileUploadForm = () => {
|
|
| 131 |
const response = await axios.post(
|
| 132 |
"https://fredericksundeep-aichatmatedev.hf.space/chat-stream-doc",
|
| 133 |
formData,
|
| 134 |
-
{ responseType: "blob"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
);
|
| 136 |
|
| 137 |
const blob = new Blob([response.data], { type: "application/zip" });
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
+
const hfToken = process.env.REACT_APP_HF_TOKEN;
|
| 54 |
|
| 55 |
|
| 56 |
const theme = useTheme();
|
|
|
|
| 131 |
const response = await axios.post(
|
| 132 |
"https://fredericksundeep-aichatmatedev.hf.space/chat-stream-doc",
|
| 133 |
formData,
|
| 134 |
+
{ responseType: "blob",
|
| 135 |
+
headers: {
|
| 136 |
+
Authorization: `Bearer ${hfToken}`,
|
| 137 |
+
},
|
| 138 |
+
}
|
| 139 |
);
|
| 140 |
|
| 141 |
const blob = new Blob([response.data], { type: "application/zip" });
|