Skip to content

Instantly share code, notes, and snippets.

import whisper
import numpy as np
from transformers import AutoProcessor, AutoModel
import gradio as gr
from transformers import pipeline
import google.generativeai as genai
target_dtype = np.int16
import cv2
import os
import sqlite3
from ultralytics import YOLO
from PIL import Image
from deepface import DeepFace
from deepface.modules import verification
import numpy as np
import os
from PIL import Image
import gradio as gr
import google.generativeai as genai
apikey = 'xxx' # Replace with your key
genai.configure(api_key=apikey)
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox()
clear = gr.ClearButton([msg, chatbot])
import gradio as gr
import google.generativeai as genai
apikey = 'xxx' # Replace with your key
genai.configure(api_key=apikey)
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox()
import gradio as gr
from openai import OpenAI
import docx2txt
from langchain.document_loaders import TextLoader
from langchain.vectorstores import FAISS
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.document_loaders import PyPDFLoader
from langchain.document_loaders import Docx2txtLoader
import os
from langchain.embeddings import OpenAIEmbeddings
import gradio as gr
from openai import OpenAI
import docx2txt
import PyPDF2
api_key = "sk-" # Replace with your key
def read_text_from_file(file_path):
# Check the file type and read accordingly
import gradio as gr
from openai import OpenAI
api_key = "sk-" # Replace with your key
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox()
clear = gr.Button("Clear")
filename = gr.File()
import gradio as gr
from openai import OpenAI
api_key = "sk-" # Replace with your key
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox()
clear = gr.Button("Clear")
import gradio as gr
from openai import OpenAI
api_key = "sk-" # Replace with your key
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox()
clear = gr.ClearButton([msg, chatbot])
import gradio as gr
from openai import OpenAI
import docx2txt
import PyPDF2
api_key = "sk-" # Replace with your key
def read_text_from_file(file_path):
# Check the file type and read accordingly