Spaces:
Sleeping
Sleeping
header add text to get hf token
Browse files
components/editor/main/request.tsx
CHANGED
@@ -9,6 +9,7 @@ import { ApiRoute, Body } from "@/utils/type";
|
|
9 |
import { useUpdateEffect } from "react-use";
|
10 |
import { Snippet } from "./snippet";
|
11 |
import { Tabs } from "./tabs";
|
|
|
12 |
|
13 |
export const Request = ({
|
14 |
parameters,
|
@@ -121,15 +122,24 @@ export const Request = ({
|
|
121 |
<p className="text-slate-200 uppercase text-xs font-semibold">
|
122 |
Headers
|
123 |
</p>
|
124 |
-
<
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
</div>
|
134 |
)}
|
135 |
{tab === "snippet" && (
|
|
|
9 |
import { useUpdateEffect } from "react-use";
|
10 |
import { Snippet } from "./snippet";
|
11 |
import { Tabs } from "./tabs";
|
12 |
+
import Link from "next/link";
|
13 |
|
14 |
export const Request = ({
|
15 |
parameters,
|
|
|
122 |
<p className="text-slate-200 uppercase text-xs font-semibold">
|
123 |
Headers
|
124 |
</p>
|
125 |
+
<div className="w-full">
|
126 |
+
<TextInput
|
127 |
+
value={headers?.Authorization}
|
128 |
+
label="Authorization"
|
129 |
+
placeholder="hf_token"
|
130 |
+
onlyAlphaNumeric={false}
|
131 |
+
onChange={(Authorization) =>
|
132 |
+
setHeaders({ ...headers, Authorization })
|
133 |
+
}
|
134 |
+
/>
|
135 |
+
<Link
|
136 |
+
href="https://huggingface.co/settings/tokens"
|
137 |
+
target="_blank"
|
138 |
+
className="text-blue-500 hover:text-blue-600 text-xs mt-3 block"
|
139 |
+
>
|
140 |
+
Get my Hugging Face token
|
141 |
+
</Link>
|
142 |
+
</div>
|
143 |
</div>
|
144 |
)}
|
145 |
{tab === "snippet" && (
|