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 sys | |
import cv2 | |
import numpy as np | |
def preprocess_frame(frame): | |
# Convert to grayscale and apply Gaussian blur | |
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) | |
blurred = cv2.GaussianBlur(gray, (21, 21), 0) | |
return blurred |
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 re | |
import requests | |
import json | |
import base64 | |
# SET THESE VALUES | |
PROJECT_ID = "<REPLACE_WITH_YOUR_PROJECT_ID_HERE>" | |
TOKEN = "<REPLACE_WITH_YOUR_TOKEN_HERE>" | |
PROMPT = "futuristic portrait of mona lisa, canon eos 5d mark iii, 50mm f/1.4 usm lens" |