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 os | |
from telegram import Update | |
from langchain_community.llms import LlamaCpp | |
from langchain.callbacks.manager import CallbackManager | |
from langchain.chains import LLMChain | |
from langchain.llms.openai import OpenAI | |
from langchain.prompts import PromptTemplate | |
from langchain import OpenAI, LLMChain, PromptTemplate | |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler | |
from langchain.memory import ConversationBufferWindowMemory, ConversationBufferMemory, ChatMessageHistory |
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
absl-py==2.0.0 | |
astunparse==1.6.3 | |
boto3==1.28.67 | |
botocore==1.31.67 | |
brisque==0.0.15 | |
cachetools==5.3.1 | |
certifi==2022.12.7 | |
chardet==4.0.0 | |
charset-normalizer==3.3.0 | |
click==8.1.7 |
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 os | |
import numpy as np | |
from PIL import Image | |
from skimage import io | |
from brisque import BRISQUE | |
from skimage.transform import resize | |
from skimage.metrics import structural_similarity as ssim | |
def load_images(image_folder, target_size=(256, 256)): |
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
absl-py==2.0.0 | |
boto3==1.28.67 | |
botocore==1.31.67 | |
cachetools==5.3.1 | |
certifi==2022.12.7 | |
chardet==4.0.0 | |
charset-normalizer==3.3.0 | |
click==8.1.7 | |
contourpy==1.1.1 | |
cycler==0.10.0 |
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 os | |
import numpy as np | |
from PIL import Image | |
from skimage import io | |
from brisque import BRISQUE | |
from skimage.transform import resize | |
from skimage.metrics import structural_similarity as ssim | |
from deepface_helper import * | |
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 os | |
import torch | |
import numpy as np | |
from PIL import Image | |
from skimage.metrics import structural_similarity as ssim | |
# Load the YOLOv5 model | |
model = torch.hub.load('ultralytics/yolov5:master', 'yolov5s') | |
# Load your three images |
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 json | |
import csv | |
from pprint import pprint | |
from slugify import slugify | |
def json_to_csv(json_data, csv_file): | |
# now we will open a file for writing | |
data_file = open(csv_file, 'w') | |
# create the csv writer object |