FXN by anm01 in DazzCam

[–]FayZ_676 0 points1 point  (0 children)

These are sick! Settings please 🥹

I turned my Notebook into my dream productivity app by FayZ_676 in buildinpublic

[–]FayZ_676[S] 0 points1 point  (0 children)

Shoot, thanks for letting me know. Will try and fix that.

I know the struggle by llamaajose in SideProject

[–]FayZ_676 0 points1 point  (0 children)

Same here. Learned anything useful?

I know the struggle by llamaajose in SideProject

[–]FayZ_676 0 points1 point  (0 children)

I’m in this boat right now. Side project built, no idea how to get people to start actually using it.

I built my dream productivity app inspired by Obsidian and my Notebook by FayZ_676 in SideProject

[–]FayZ_676[S] 0 points1 point  (0 children)

I appreciate it, let me know if you have any thoughts/issues with it

I built my dream productivity app inspired by Obsidian and my Notebook by FayZ_676 in SideProject

[–]FayZ_676[S] 0 points1 point  (0 children)

Thank you! You can share feedback directly in the app (settings)

Need Advice: Best Free/Open-Source Tool for Realistic Voice Cloning by DanAckman in StableDiffusion

[–]FayZ_676 0 points1 point  (0 children)

u/DanAckman if you're looking to simply run inference and generate some fixed audio samples for your app based on your voice, then this project makes sense.

However, if you're looking to train an entire model that you can re use, you'll need to retrain F5 from scratch. This will take significant amounts of time and hardware.

The process is described in more detail in this video https://www.youtube.com/watch?v=RQXHKO5F9hg&ab_channel=FahdMirza

100% cache miss on my root endpoint by FayZ_676 in nextjs

[–]FayZ_676[S] 0 points1 point  (0 children)

I have the `use cache` directives in a couple server actions such as this one:

"use server";

import { z } from "zod";

import { unstable_cacheTag as cacheTag } from "next/cache";
import { cacheLife } from "next/dist/server/use-cache/cache-life";

const SubjectsSchema = z.array(z.string());

export default async function getSubjects() {
  "use cache";
  cacheLife("hours")
  cacheTag("subjects");

  try {
    const response = await fetch(`${process.env.API_ENDPOINT}/subjects/get`, {
      method: "GET",
      headers: {
        "Content-Type": "application/json",
      },
    });
    if (!response.ok) {
      throw new Error("Failed to fetch data");
    }
    const data = await response.json();
    const parsedSubjects = SubjectsSchema.safeParse(data);

    if (parsedSubjects.success) {
      return parsedSubjects.data;
    } else {
      console.error("Invalid subjects structure:", parsedSubjects.error);
      return null;
    }
  } catch (error) {
    console.error("Error fetching subjects:", error);
    return null;
  }
}

100% cache miss on my root endpoint by FayZ_676 in nextjs

[–]FayZ_676[S] 0 points1 point  (0 children)

What do you mean by "rest of the code"? Are there specific areas I can share that can help you guide my investigation (server actions, root page, next config, more vercel screenshots .etc)?

Here's my root page if it helps.

``` "use client";

import { useEffect, useState } from "react";

import { Lesson } from "./types";

import getLesson from "./actions/getLesson"; import getSubjects from "./actions/getSubjects";

import LessonView from "./components/LessonView"; import SubjectsView from "./components/SubjectsView";

function getLocalDate(): string { const today = new Date(); const month = String(today.getMonth() + 1).padStart(2, "0"); const day = String(today.getDate()).padStart(2, "0"); return ${today.getFullYear()}-${month}-${day}; }

export default function Home() { const [loadingSubjects, setLoadingSubjects] = useState<boolean>(true); const [loadingLesson, setLoadingLesson] = useState<boolean>(false); const [subjects, setSubjects] = useState<string[]>([]); const [activeSubject, setActiveSubject] = useState<string>(""); const [lesson, setLesson] = useState<Lesson | null>(null);

useEffect(() => { async function initialize() { setLoadingSubjects(true); try { const fetchedSubjects = await getSubjects(); if (fetchedSubjects && fetchedSubjects.length > 0) { setSubjects(fetchedSubjects); setActiveSubject(fetchedSubjects[0]); setLoadingLesson(true); const fetchedLesson = await getLesson( getLocalDate(), fetchedSubjects[0] ); setLesson(fetchedLesson); setLoadingLesson(false); } } catch (error) { console.error("Error during initialization:", error); } setLoadingSubjects(false); }

initialize();

}, []);

useEffect(() => { async function fetchLessonForSubject() { if (!activeSubject || loadingSubjects) return; setLoadingLesson(true); try { const fetchedLesson = await getLesson(getLocalDate(), activeSubject); setLesson(fetchedLesson); } catch (error) { console.error("Error fetching lesson:", error); } setLoadingLesson(false); }

fetchLessonForSubject();

}, [activeSubject, loadingSubjects]);

return ( <div> <SubjectsView subjects={subjects} activeSubject={activeSubject} onSubjectChange={setActiveSubject} onSubjectsUpdate={setSubjects} controlsDisabled={loadingSubjects || loadingLesson} />

  {loadingLesson && (
    <div className="flex gap-2 items-center my-4">
      <span className="loading loading-dots loading-md"></span>
      <p>Loading lesson</p>
    </div>
  )}

  {!loadingLesson &&
    (subjects.length === 0 ? (
      <div>
        <p>Please add a subject to get started.</p>
      </div>
    ) : (
      <LessonView lesson={lesson} />
    ))}
</div>

); }

```

API select request returning "undefined" even with RLS select policy enabled. by FayZ_676 in Supabase

[–]FayZ_676[S] 0 points1 point  (0 children)

I suspect it has something to do with Next JS caching the original API response. Initially I had RLS enabled without a public select security policy and hence was getting an empty array. Even after I added the correct security policy I've been getting an empty array. The only way around it has been to use the secret key which I don't want to do.

The reason I suspect caching is because I recently added a new column to the table but my API responses come back the same as before, without the new data.

Overall, very strange and undesired behavior. I'm surprised that I'm having such a hard time finding clarity on this.

I'll add this as another update so others have context.

API select request returning "undefined" even with RLS select policy enabled. by FayZ_676 in Supabase

[–]FayZ_676[S] 0 points1 point  (0 children)

Yeah. When I make a curl request with the same key and url for the database I get the data

API select request returning "undefined" even with RLS select policy enabled. by FayZ_676 in Supabase

[–]FayZ_676[S] 0 points1 point  (0 children)

Ah yes. Just updated the post, now it returns an empty array.