alexkueck commited on
Commit
01ade36
·
1 Parent(s): 0177758

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py CHANGED
@@ -5,6 +5,30 @@ import os, sys, json
5
  import gradio as gr
6
  from langchain.evaluation import load_evaluator
7
  from pprint import pprint as print
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
 
10
  # access token with permission to access the model and PRO subscription
 
5
  import gradio as gr
6
  from langchain.evaluation import load_evaluator
7
  from pprint import pprint as print
8
+ import time
9
+
10
+ from langchain.chains import LLMChain, RetrievalQA
11
+ from langchain.chat_models import ChatOpenAI
12
+ from langchain.document_loaders import PyPDFLoader, WebBaseLoader, UnstructuredWordDocumentLoader, DirectoryLoader
13
+ from langchain.document_loaders.blob_loaders.youtube_audio import YoutubeAudioLoader
14
+ from langchain.document_loaders.generic import GenericLoader
15
+ from langchain.document_loaders.parsers import OpenAIWhisperParser
16
+ from langchain.schema import AIMessage, HumanMessage
17
+ from langchain.llms import HuggingFaceHub
18
+ from langchain.llms import HuggingFaceTextGenInference
19
+ from langchain.embeddings import HuggingFaceInstructEmbeddings, HuggingFaceEmbeddings, HuggingFaceBgeEmbeddings, HuggingFaceInferenceAPIEmbeddings
20
+
21
+ from langchain.embeddings.openai import OpenAIEmbeddings
22
+ from langchain.prompts import PromptTemplate
23
+ from langchain.text_splitter import RecursiveCharacterTextSplitter
24
+ from langchain.vectorstores import Chroma
25
+ from chromadb.errors import InvalidDimensionException
26
+
27
+ #from langchain.vectorstores import MongoDBAtlasVectorSearch
28
+ #from pymongo import MongoClient
29
+
30
+ from dotenv import load_dotenv, find_dotenv
31
+ _ = load_dotenv(find_dotenv())
32
 
33
 
34
  # access token with permission to access the model and PRO subscription