This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from celery import shared_task | |
| import os | |
| from pprint import pprint | |
| from dotenv import load_dotenv | |
| import logging, verboselogs | |
| from datetime import datetime, timedelta | |
| import json | |
| from django.conf import settings | |
| from langchain_community.llms import OpenAI as LLMOpenAI | |
| from langchain.prompts import PromptTemplate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { decode } from "blurhash" | |
| const cache: Record<string, string> = {} | |
| export function blurHashToDataURL(hash: string | undefined): string | undefined { | |
| if (!hash) return undefined | |
| const cachedBlurDataURL = cache[hash] | |
| if(cachedBlurDataURL) { |