diff --git a/.env.example b/.env.example index c7082a7..2895913 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,8 @@ S3_UPLOAD_BUCKET= S3_UPLOAD_REGION= REPLICATE_API_TOKEN= REPLICATE_USERNAME= +REPLICATE_MAX_TRAIN_STEPS=3000 +NEXT_PUBLIC_REPLICATE_INSTANCE_TOKEN= SECRET= EMAIL_FROM= EMAIL_SERVER=smtp://localhost:1080 diff --git a/README.md b/README.md index b89d0af..0f7c88d 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,10 @@ S3_UPLOAD_REGION= // Replicate API token / username REPLICATE_API_TOKEN= REPLICATE_USERNAME= +REPLICATE_MAX_TRAIN_STEPS=3000 + +// Replicate instance token (should be rare) +NEXT_PUBLIC_REPLICATE_INSTANCE_TOKEN= // Random secret for NextAuth SECRET= diff --git a/package.json b/package.json index 950f7ec..5846136 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "superjson": "^1.12.0", "typescript": "4.9.3", "uniqid": "^5.4.0", - "url-slug": "^3.0.4", "windups": "^1.2.1" }, "devDependencies": { diff --git a/src/components/dashboard/Uploader.tsx b/src/components/dashboard/Uploader.tsx index d7b1a9a..94c56ae 100644 --- a/src/components/dashboard/Uploader.tsx +++ b/src/components/dashboard/Uploader.tsx @@ -37,7 +37,7 @@ const Uploader = ({ handleOnAdd }: { handleOnAdd: () => void }) => { const [uploadState, setUploadState] = useState("not_uploaded"); const [errorMessages, setErrorMessages] = useState([]); const [urls, setUrls] = useState([]); - const [instanceName, setInstanceName] = useState(""); + const [studioName, setStudioName] = useState(""); const [instanceClass, setInstanceClass] = useState("man"); const { uploadToS3 } = useS3Upload(); const toast = useToast(); @@ -102,7 +102,7 @@ const Uploader = ({ handleOnAdd }: { handleOnAdd: () => void }) => { () => axios.post("/api/projects", { urls, - instanceName, + studioName, instanceClass, }), { @@ -112,7 +112,7 @@ const Uploader = ({ handleOnAdd }: { handleOnAdd: () => void }) => { // Reset setFiles([]); setUrls([]); - setInstanceName(""); + setStudioName(""); setInstanceClass(""); setUploadState("not_uploaded"); @@ -262,17 +262,10 @@ const Uploader = ({ handleOnAdd }: { handleOnAdd: () => void }) => { setInstanceName(e.currentTarget.value)} + placeholder="Studio name" + value={studioName} + onChange={(e) => setStudioName(e.currentTarget.value)} /> - - This name will be use to name your person in your prompt:{" "} - {`Painting of ${ - instanceName || "Alice" - } ${instanceClass} by Andy Warhol`} - . -